Give an example of a shift in consumer and producer surplus. How did it affect the market efficiency?

Any non-subsidized farm product is a good example. Consider the local orchardists who sell peaches. When the weather is perfect, there is an abundance of the fruit. Since each farmer must sell at a competitive price, the cost to the consumer is usually lower. When only a few orchards are able to send peaches to market, the price is higher.

I think you must have phrased this wrong. Surplus do you mean supply? There is never a shift in surplus..
Surplus only really every happens when price controls are institiuted.. for the most part.
Supply, an example of a supply shift happens with a variety of reasons one being technology. When Henry Ford created the essembly line for a car factory he could take a car that would ussually take 14 hrs. and make it in 90minutes. That made manufacuting cheaper.. prices went down, more people could buy cars, they became the most efficent form of transportation, roads became better, ect. So it was good. Not good for morality because of the sexuality abuse that cars created oppurtunity for.

Consumer Surplus
Suppose the demand for ice cream cones is Qd = 20 - 10P, and the supply of ice cream cones is Qs = 10P. Equilibrium in the ice cream cone market occurs where Qd = Qs => 20 - 10P = 10P => 20 = 20P => P = $1, Q = 10. Thus, each consumer pays $1 for an ice cream cone, and a total of 10 ice cream cones are purchased. (See graph.) How much value do consumers receive from these 10 ice cream cones?
The demand curve shows the amount each consumer is willing to pay for an additional unit of output. According to this demand curve, consumers are willing to pay $1.90 for the first unit of output. Thus, the first ice cream cone must have a value of $1.90. Consumers are willing to pay $1.80 for the second ice cream cone, etc., until consumers are just willing to pay $1.00 for the 10th ice cream cone. (See table.) Thus, the total area under the demand curve, from the vertical axis to the quantity purchased, shows total value consumers receive from ice cream cones. What is this total value? We could calculate the value for all 10 ice cream cones and sum, or take the integral of the demand curve as Q varies from 0 to 10. (Make sure that the demand curve is expressed with Q as the independent variable so you can integrate with respect to Q.) 010 (2 - 0.1Qd)dQd = $15. Alternatively, with a straight line demand curve, you can calculate the area of the corresponding rectangle (base * height) plus triangle (1/2 * base * height). In this case, this equals [(10 – 0)* (1 – 0)] + [0.5 * (10 – 0) * (2 – 1)] = 10 + 5 = 15.
Consumers gain a value of $15 from the ice cream cones. However, because all consumers pay the same price, they had to pay $10. (Note that the market price is equal to the value received by the last consumer. Everyone but the last consumer receives a surplus value. Value equals price for the last consumer.) Thus, consumers gain a total surplus of $5 of value, value in excess of what they paid. This is called the consumer surplus, and is the area between the demand curve and the market price as quantity varies from 0 to the total quantity exchanged. (See graph.) This value can be approximated by calculating value minus price for each consumer and summing across consumers (see table); by integrating the demand curve minus market price as Q varies from 0 to the total Q exchanged, or by calculating the area of the triangle created by the demand curve and the market price (for a straight line demand curve). (Note that the values in the table are only approximations. The sum of consumer surplus in the table is $4.50, as opposed to the $5.00 value calculated above. The difference results because the table assumes that consumers have a constant value for each ice cream. According to the demand curve, the value for the first ice cream falls from 2.00 to 1.90 as quantity varies from 0 to 1. Thus, the actual consumer surplus would be $.95 as opposed to the $.90 value in the table. All table entries are underestimated by a similar amount, so the table underestimates consumer surplus by $.50.)

A shift in consumer and producer surplus refers to a change in the welfare of consumers and producers in a market due to a change in either demand or supply conditions. Let's take the example of a non-subsidized farm product, such as peaches from local orchardists.

When the weather is perfect and there is an abundance of peaches, the supply increases, which leads to a decrease in price. This benefits consumers because they can purchase peaches at a lower cost. At the same time, producers may experience a decrease in producer surplus because they are receiving a lower price for their product.

On the other hand, when only a few orchards are able to send peaches to the market, the supply decreases, resulting in a higher price. This shift in supply can lead to an increase in producer surplus because producers are now able to sell their peaches at a higher price. However, consumers may face a decrease in consumer surplus since they have to pay a higher price for the peaches.

The effect on market efficiency depends on the magnitude of the change in consumer and producer surplus. In general, an increase in consumer surplus and a decrease in producer surplus would indicate an improvement in market efficiency. This suggests that consumers are getting more value for their purchases while producers are operating at a lower cost. Conversely, a decrease in consumer surplus and an increase in producer surplus would indicate a decrease in market efficiency.