1. Go-Back-N protocol state machines for the sender and receiver are being used over a channel that can re-order packets in addition to inserting errors and losing packets. Consider a situation in which the Window Size is 4, and the sender transmits packets 0, 1, 2, and 3, all of which are correctly received and acknowledged by the receiver. However, the ACK for packet 1 is delayed by the channel and arrives at the sender after the ACKs for packets 0, 2, and 3. Trace the actions on the state machines to answer each of the following parts. Draw a timing diagram to support your answers. a) What does the sender do when it receives ACK 0? b) What does the sender do when it receives ACK 2? c) What does the sender do when it receives ACK 3? d) Just before the sender receives ACK 1, what are the values of nextseqnum and base? e) When the sender receives ACK 1, which transition of the sender’s FSM is triggered? List the specific actions in the transition that are executed. What are the new values of nextseqnum and base? What does the sender do at this time? f) What went wrong with the protocol in the above situation? Suggest modifications to the state machines to correct this problem. 2. Suppose the Go-Back-N protocol is being used with 3-bit long packet sequence numbers and a Window size of 8. Note that this Window size is larger than what is permitted by the formula for maximum Window size. Draw two timing diagrams illustrating two alternative scenarios to demonstrate that the protocol will not operate correctly with this window size. These scenarios would be similar to the scenarios we drew in class for the Selective Repeat protocol. 3. Consider a full-duplex transmission link which is 500 km long and has a transmission speed of 100 Mbps in both directions. The propagation delay is 5 msec. per 1000 km. The channel has no errors and no packet loss. The Go-Back-N protocol is being used to transmit data packets which are 2,000 bits long in one direction. The window size is 100. You may assume that ACKs returned in the opposite direction are small in size so their transmission time can be ignored. You may also ignore processing times and queuing delays for both data packets and ACKs. a) Calculate the utilization of the protocol. b) If everything else is the same as above, what would be the length of the link for the utilization to be 0.01? c) If everything else is the same as above, how long should the data packets be for the utilization to be 0.5? d) If everything else is the same as above, what should be the window size for the utilization to be 1?
What does the Override annotation do?2) It only adds to readability; it performs no other functions beyond that. 1) It
What does the Override annotation do?2) It only adds to readability; it performs no other functions beyond that. 1) It instructs the compiler to ignore calls to super.3) It instructs the compiler to ignore other methods of the same name. 4) It instructs the compiler to double-check the method declaration is correct.Please select one, Thank you!
Trace the following pseudocode using the table below. First two lines in the table has been filled for you. means
Trace the following pseudocode using the table below. First two lines in the table has been filled for you. means unknown.You can show the final output after thetable.1. a = 102. b = 03. while a > 6 do steps 3.a to 3.ca. if a mod 2 is equal to 0 do step3.a.ii. b = b ab. otherwise do step 3.b.i i. b = b -ac. a = a – 14. Write b2. Suppose you are given the followingarrayx = [1, 6, 7, 9] And key = 8.Search for key within x using binary search algorithm.For each round show the values of low, high and mid until the algorithm either finds the key in x or does not. First round has been done for you.Round 1:low = 0, high = 1 = 3, mid = (0 3)/2 = 3/2= 1
Hello, I needed to offer an additional menu item that will display the list with secondary colors indicated where possible.
Hello, I needed to offer an additional menu item that will display the list with secondary colors indicated where possible. For example: red red PURPLE blue GREEN yellow yellow yellow.The following code is in C and has three files. I wanted to add the function prototypes. Much is appreciated.*******main.cpp*********#include #include “inventory.h”using namespace std;//main functionint main () { //defining vaiables and inventory object inventory I; int choice, pos, res; string d; do { //displaying menu cout << "n1. Append"; cout << "n2. Insert"; cout << "n3. Delete"; cout << "n4. Print"; cout << "n5. Reverse"; cout << "n6. Search"; cout <> choice; //case handling switch (choice) { case 1: //entering input cout <> d; I.append (d); break; case 2: { //entring input color string d; cout <> d; //entring position cout <> pos; res = I.insert (d, pos); //displaying result if (res == -1) cout << "nPosition does not exist"; break; } case 3: //entring position cout <> pos; res = I.Delete (pos); //displaying result if (res == -1) cout << "nPosition does not exist"; break; case 4: //printing the inventory cout << "nINVENTORY: n"; I.print (); break; case 5: //reversing inventory I.reverse (); break; case 6: //entering primary color to search for cout <> d; //evaluating result pos = I.search (d); if (pos == -1) cout << "nColor not found!"; else cout << "nColor found at position " << pos; break; default: break; } } while (choice < 7);}********inventory.cpp*********#include "inventory.h"//include the inventory header file#include inventory::inventory () { //constructor head = NULL; tail = NULL;}//append functionvoid inventory::append (string d) { //input validation if (d != “red”
) For three points on the plane (x1, y1), (x2, y2) and (x3, y3) show that the determinant of is
Computer Science Assignment Writing Service) For three points on the plane (x1, y1), (x2, y2) and (x3, y3) show that the determinant of is proportional to the area of the triangle whose corners are the three points. If these points lie on a straight line, what is the value of the determinant? Does this give a useful test to tell whether three points lie on a line? Why do you think so?
16. The roots of the equation ax2 bx c = 0 are given by the formula X= -b
16. The roots of the equation ax2 bx c = 0 are given by the formula X= -b ± √b 4ac And aa) Draw a flow-chart to compute the roots of the equation. b) Using the flow-chart write program that will compute the roots and if b2- 4ac is negative, the program should display the message “NEGATIVE” 17. A multinational organization has offered to donate computers to your school. The Board of Governors has requested you advise on the operating system to be used by providing answers the following questions. a) What is an operating system? b) State and briefly explain any two types of operating systems c) Briefly explain any four functions of an operating system. 18. a) i) State one area where computer are used. ii) Give any two advantages of using computers in this area b) Explain the effect of computers technology in the following areas: i) Job opportunities ii) Job Skills iii) Communication 19. A computer vendor has recommended the use of a computer database to your school for student information a) Explain to the Board of Governors what a database is and its functions b) Give two examples of database systems c) Briefly explain any two advantages and two disadvantages of using a Database 20. a) what is a computer network topology? b) Using appropriate diagrams, show any three computer network topologies c) Briefly explain two reasons why organizations need to network their computers.
5. A 3 by 4 matrix M is to be added to another 3 by 4 matrix array N so
5. A 3 by 4 matrix M is to be added to another 3 by 4 matrix array N so as to give a third 3 by 4 matrix array P. Using a high level programming language, write program segment that assigns the sum of M and N to P. 6. the first column in the table below contains the formulae as stored into the cell F10 of a spreadsheet. Enter the formulae, as they would appear when copied to the cell M20 of the same spreadsheet. Formula in F10 Formula in m20 =D10* E10 =A$ 25 =$ D$13 7. Give three advantages of separating data from the applications that use the data in database design. 8. Explain the impact of information on organizations in each of the following areas: a) Competition b) Pace of growth 9. a) List any four tasks that an electronic spreadsheet should be able to perform other than calculations b) Explain what is meant by automatic recalculation as used in a spreadsheet. 10. Describe the functions of the following computer hardware components: a) Mouse b) Scanner. 11. State two differences between Disk Operating System (DOS) and WINDOWS operating system. b) i) Define the term application software ii) Give one example of application software 12. a) Give one difference between internal and external commands in Disk Operating System. b) Name twp DOS commands that may be used for checking disk errors. 13. Explain how a paragraph can be moved from one place to another in word- processing. 14. Define the term structured programming. Compare the two types of diskettes used in microcomputers in terms of physical size and densities. 2. Why is it necessary to have a UPS in a computer laboratory? 3 a) Explain what is meant by batch processing b) Give one advantage and one disadvantage of batch processing 4. List any four high level programming languages
Using pseudocode, design a program that has two parallel arrays: a string array named ‘people’ that contains the names of
Using pseudocode, design a program that has two parallel arrays: a string array named ‘people’ that contains the names of seven people, and a string array named ‘phone-numbers’ that is initialized with their phone numbers.The program should allow the user to enter a person’s name or part of the person’s name. It should then search for that person in the ‘people’ array.If the person is found, it should then get that person’s phone number from the ‘phone-numbers’ array and display it.If the person cannot be found in the ‘people’ array, the program should display a message saying “Not found.”
1. (3) |A ∪ B| = |A | |B| – |B ∩ A| Using the formulas: (1) |A ∪
1. (3) |A ∪ B| = |A | |B| – |B ∩ A| Using the formulas: (1) |A ∪ B| = |A – B| |A ∩ B| |B – A| and (2) |B| = |A ∩ B| |B – A| a. If |A – B| == 20 | A ∪ B | == 70 and | A ∩ B | == 25 find | B| ANS: ____ b. If |A| == 20 | B | == 25 and | A ∪ B | == 40 find |B ∩ A| ANS ____ 2. Use the permutation formula or the combination formula as appropriate to answer: a. Given a class of 5 students in how many ways can we select a committee of 3 students b. Given a class of 5 students in how many ways can we select a President, and a treasurer
Assume :● A1:One instruction can issue(allocate) per cycle● A2:Reservation stations: Load/store unit(5), FPADD(3), FPMD(3), IntegerADD(3); call these LD1-LD5, ADF1, ADF2,
Assume :● A1:One instruction can issue(allocate) per cycle● A2:Reservation stations: Load/store unit(5), FPADD(3), FPMD(3), IntegerADD(3); call these LD1-LD5, ADF1, ADF2, ADF3, MDF1, MDF2, MDF3, ADDI1, ADDI2, ADDI3● A3:There is one FP adder, one FP multiplier, one Integer adder● A4:Functional units are not pipelined● A5:Latency: FP ADD(4cycles), FP MUL(10cycles), Integer ADD(1cycle)● A6:Write Result and Exec occur in separate cycles(i.e.,an instruction writes to the CDB in cycle n,and its dependent instruction starts execution in cycle n 1)● A7:There is only one CDB(means that two functional units cannot broadcast result in the samecycle – if two instructions finish execution in cycle n, one of them can write back result in cycle n 1 – priority is Integer ADD, FP ADD, FP MUL, and Load/Store – means that if Integer ADD and Load/Store compete for CDB, Integer ADD writes back result first)● A8: If a functional unit completes execution at cycle n, it can be used for another instruction at cycle n 1 (* dependent instruction uses the same functional unit starts at n 2 – see A6)● A9: Following A8, if there is more than one ready instruction to be executed next by a functional unit, pick the one that has the earliest issue time● A10: Loads and stores take 6 cycles in Memory stage and 1 cycle in Execute stage● A11:An instruction stalls at issue if an appropriate reservation station(RS) is not available. It mayissue in the cycle after the previous instruction starts execution (i.e., if ADD.D X is stalled because all add RS’s are occupied, and then one of the ADD.D starts execution on cycle n, then the ADD.D X can issue at cycle n 1)● A12:If more than one reservation station is available(e.g.,ADF1andADF2), issue the instruction to the RS with the lower number (e.g., ADF1)● A13:Re-order buffer size is 64● A14:If one instruction stalls at issue, the succeeding instructions also stall.
Overviewthe statistical characteristics of observed weather at that location. You can think of a weather A weather generator produces a
Overviewthe statistical characteristics of observed weather at that location. You can think of a weather A weather generator produces a “synthetic” time series of weather data for a location based ongenerator as being a simulator of future weather based on observed past weather. A time series isa collection of observations generated sequentially through time. The special feature of a timeseries is that successive observations are usually expected to be dependent. In fact, this dependence is often exploited in forecasting.Since we are just beginning as weather forecasters, we will simplify our predictions to justwhether measurable precipitation will fall from the sky. If there is measurable precipitation,we call it a “wet” day. Otherwise, we call it a “dry” day.Weather PersistenceTo help with understanding relationships and sequencing events through time, here’s a simplepseudocode that shows what it means for precipitation to be persistent from one day to the next.READ “Did it rain today?” IF answer is yes THEN There is a greater chance that tomorrow will be wet rather than dry ELSE There is a greater chance that tommorrow will be dry rather than wet ENDIF has literally thousands of videos about weather fronts and how they are connected to weather.This one from the UK has graphics that are supportive of the idea of persistence (though that word is not used).Time of year and locationWeather data depends on both the time of year and the location. This means that the probabilitiesused in the simulation need to be associated with both a location and a time of year.The table below lists the probabilities that a day will be wet given that the previous day was dryfor each month for a weather station near Norman, OK. This table gives the probability of a changefrom dry to wet. These are “real” numbers that reflect how often the weather changed from dry to wet in that specific location, during the month indicated, over the 30-year period from 1970-2000.January February March April May June July August September October November December 0.27 0.33 0.40 0.46 0.43 0.28 0.12 0.17 0.23 0.21 0.28 0.27The next table lists the probabilities that a day will be wet given that the previous day was wet forthe same weather station near Norman, OK. This table gives the probability that the weather remainswet from one day to the next.January February March April May June July August September October November December 0.55 0.58 0.61 0.69 0.73 0.62 0.45 0.55 0.58 0.55 0.59 0.55Armed with these probabilities, we can turn our simulation into a weather generator for this location.Here’s what it would look like for July in Norman, OK.READ “Did it rain today?” IF answer is yes THEN READ a random value between 0 and 1 IF the random value is less than or equal to 0.45 THEN No change! It is a wet day ELSE Change! It is a dry day ENDIF ELSE READ a random value between 0 and 1 IF the random value is less than or equal 0.12 THEN Change! It is a wet day ELSE No change! It is a dry day ENDIF ENDIF If it’s a dry day, we want the outcome to simulate “no change” 88% of the time and “change” 12% of the time.A common practice would be to use a random number generator to generate some value between 0 and 1. If the random value is less than .88, then there would be no change, and if it is greater than .88 then the weather changes to rain.If it’s a wet day, we want to simulate “no change” 45% of the time and “change” 55% of the time. With random number generator, we say there is “no change” if random number is less than .45 and a change to dry if it is greater.The weather generator methods you will be writing for this assignment will:predict future precipitation pattern for one month: oneMonthGeneratorfind the number of wet or dry days in a given month’s forecast: numberOfWetDryDaysfind the longest wet or dry spell in a given month’s forecast: lengthOfLongestWetDrySpellFuture transition probability table as a 2D arrayThe oneMonthGenerator method receives as arguments the transition probability tables (dry to wet, and wet to wet) as 2D arrays.Each table row corresponds to a location (longitude, latitude) in the USA and contains the transition probabilities for each month of the year.Following are the methods to be completed in WeatherGenerator.java:public class WeatherGenerator { /* Given a location (longitude, latitude) in the USA and a month of the year, the method * returns the forecast for the month based on the drywet and wetwet transition * probabilities tables. * * month will be a value between 2 and 13: 2 corresponds to January, 3 corresponds to February * and so on. These are the column indexes of each month in the transition probabilities tables. * * The first day of the month has a 50% chance to be a wet day, 0-0.49 (wet), 0.50-0.99 (dry) * * Use StdRandom.uniform() to generate a real number uniformly in [0,1) */ int[] oneMonthGenerator(double longitute, double latitude, int month, double[][] drywet, double[][] wetwet) // Returns the longest number of consecutive mode (WET or DRY) days in forecast. int numberOfWetDryDays (int[] forecast, int mode) /* * Analyzes the forecast array and returns the longest number of * consecutive mode (which can be WET or DRY) days in forecast. */ int lengthOfLongestWetDrySpell (int[] forecast, int mode) } Use the main method as a driver to test your methods. To generate the weather for location at longitude -98.76 and latitude 26.70 for the month of February do:java WeatherGenerator111 -98.76 26.70 3 public static void main (String[] args) { int numberOfRows = 4001; // Total number of locations int numberOfColumns = 14; // Total number of 14 columns in file // File format: longitude, latitude, 12 months of transition probabilities // Allocate and populate arrays that hold the transition probabilities double[][] drywet = new double[numberOfRows][numberOfColumns]; double[][] wetwet = new double[numberOfRows][numberOfColumns]; populateTransitionProbabilitiesArrays(drywet, wetwet, numberOfRows); /*** WRITE YOUR CODE BELLOW THIS LINE. DO NOT erase any of the lines above. ***/ // Read command line inputs double longitute = Double.parseDouble(args[0]); double latitude = Double.parseDouble(args[1]); int month = Integer.parseInt(args[2]); int[] forecast = oneMonthGenerator(longitute, latitude, month, drywet, wetwet); int drySpell = lengthOfLongestSpell(forecast, DRY); int wetSpell = lengthOfLongestSpell(forecast, WET); StdOut.println(“There are ” forecast.length ” days in the forecast for month ” month); StdOut.println(drySpell ” days of dry spell.”); for ( int i = 0; i < forecast.length; i ) { // This is the ternary operator. (conditional) ? executed if true : executed if false String weather = (forecast[i] == WET) ? "Wet" : "Dry"; StdOut.println("Day " (i 1) " is forecasted to be " weather); } }
· No data file. You need to develop your own spreadsheet model(s). Blair
· No data file. You need to develop your own spreadsheet model(s). Blair
Array List Assignment int size() Returns the number of elements in this list.Class Implementation DetailsIn your MyArrayList class, store the
Array List Assignment int size() Returns the number of elements in this list.Class Implementation DetailsIn your MyArrayList class, store the elements in an array of Objects.Note, you can not use ArrayList in your MyArrayList class (including inheriting from it).Because the elements are stored as Object objects, cast them back to the generic type before returning them. To remove the following warning:Note: MyArrayList.java uses unchecked or unsafe operations.Note: Recompile with -Xlint:unchecked for details. Place the following annotation just before the method that casts the element back to the generic type: @SuppressWarnings(“unchecked”)When removing an element, shift all of the other elements down (so that there are no indices with invalid references with an index less than the size).Do NOT decrease the capacity after removing or clearing elements.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more
Recent Comments