The book retailer’s shares are up 3.4% in early trading after it announced a plan to offer its software in Samsung Galaxy Tab 4 Nook tablets, enabling Barnes & Noble to lessen its exposure to its Nook tablets that have struggled to keep up with rivals including Apple’s iPad and Amazon’s Kindle. A 7-inch version of the Samsung tablet with Nook will be out in August and sold at Barnes & Noble stores and its website. The chain will continue to offer its Nook GlowLight e-reader. But CEO Michael Huesby says that the collaboration means B&N can “reduce its exposure to the substantial cost structure and other financial commitments” from tablet production and focus on “acquiring and delivering the best digital reading experience to grow Nook content sales.” B&N has agreed to buy 1M of the tablets in the first year after they hit the shelves — possibly going to 15 months if they don’t meet “certain sales thresholds” — it says in an SEC filing. The companies have a two-year agreement. In addition to the Samsung announcement, Nook has agreed to move from its 208,000-square-foot facility in Palo Alto to a new 88,000-square-foot office in Santa Clara while the Barnes & Noble College digital education employees move to a facility in Mountain View. That will reduce annual occupance expenses by $10M, and future lease commitments by $102M.