Answer:
We should start by assuming that before the technological break through is made, the tofu industry is at equilibrium. The new technology will result in the production costs of tofu decreasing, which will shift the supply curve to the right. At first, production costs of just the innovative firm will decrease, but eventually other firms will catch up with the new technology. In the short run, the innovative firm will be able to make an economic profit since the industry will not have reached equilibrium. But after a while, as more firms adopt the new technology, equilibrium will be reached and economic profit will disappear (halting the rightward shift).
If the government grants a patent to the innovative firm that developed the new technology, then a monopoly might result. This is something similar to monopolies resulting from patents in the pharmaceutical industry. The profits of this specific company will increase, resulting in economic profit. Governments hand out patents as a way to reward innovation and encourage it. Imagine if patents didn't exist, how many companies would invest billions in R&D if they know that their competition will use that research for free?
When patents are granted, prices increase, and consumer surplus decreases.