Create the R scripts to generate the optimal solution for the given problems. Use separate R file for each problem and
follow the filenames given below. In addition, put comments (or description) on each line of the code explaining what
is being done in the code (per line).
I just need the codes

1. At the end of a cycle of schedules, a trucking firm has a surplus of one vehicle each in cities A, B, C, D, E, and F and a deficit of one vehicle each in cities 1, 2, 3, 4, 5, and 6. The distances between cities with a surplus and the cities with a deficit are shown below. Find an assignment of surplus vehicles to deficit cities that will result in a minimum total distance. What is the total distance? A B с D E F 1 2 3 4 5 6 9 22 58 11 19 43 78 72 50 63 41 28 91 37 45 74 42 27 49 1 Source 2 3 39 1 100 50 40 Demand 100 2433 27 48 36 11 57 22 25 18 3 56 53 31 17 28 2. Find the optimal solution for the transportation problem having the cost and requirement table below. Destination 2 3 4 5 Supply 140 35 400 150 200 70 60 65 80 200 90 100 150 130 200 200 150 160 140