Question: Java OOP Collection See the figure 5. (10 marks) Indicate which of the Java Collection objects you think is best suited to represent each of

Java OOP Collection See the figure

Java OOP Collection See the figure 5. (10 marks) Indicate which of

5. (10 marks) Indicate which of the Java Collection objects you think is best suited to represent each of the following collections of data. Give a brief justification for your answer. (a) (5 marks) Permutations. Given a set of integers I, a permutation of I is a sequence in which every element of I appears exactly once. For instance, the sequence 3,7,9,5, 2 is a permutation of the set I = {2,3,5,7,9}. In a permutation, it is important to know by which element a given element is followed, rather than at which index it is located. For instance, in the previous example, it is more important to know that 7 is followed by 9 than that 7 has index 1 in the permutation sequence. (b) (5 marks) Automata. An automaton is a set of pairs (state,successors (state)) where: state is a character (usually a letter); successor (state) is a set of characters representing the successors of state. An automaton is usually represented as a directed graph where the vertices are the states and the edges point from a state to its successors. For example, in Figure 1 below, the successors of the state a are a, c, and d, the successors of b are a and c, and c and d have no successor. The order in which states appear in the automaton is not important. . Figure 1: Graphical representation of an automaton

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!