Please help me improve the complexity of the following algorithms.
Smiling diagram (If you already know what the swan is the diagram, please skip this section, please go directly to the next section): < P> Consider the partially set set (for posit, short) (A, a ????), where A is a set and one partial order is an element of node position of the diagram, and if If two elements x and y are connected to a line then x is a Y or y ??? X The elements and connection status respect the following rules: If x In the pause, y is displayed below the point corresponding to the point y, which is equal to x. The transit of positives has been left graphically, that is, if x one ?? ?? Y and y ??? Z, then, by the transit of partial order, ???? Jade. In this case the connection is left xz. Similarly, reflexivity is dropped graphically. Representation of Poset's Hasse diagram (S = {{1,2,3,5}, {2,3}, {5}, {3}, { 1,3}, {1,5}}, a ????) as follows (only the notice of the edges) {1,2,3,5} -> {2,3} {1,2,3,5} - & gt; {1,3} {1,2,3,5} - & gt; {1,5} {2,3} - & gt; {3} {1,3} - & gt; {3} {1,5} - & gt; {5} My initial idea Only the algorithm I can think is that O (N ^ 2) is as follows: Read the first element and insert it as the first element in the Haas Diagram. As we read the next elements, put them in the correct position in the picture already created (Suppose that the picture created in the picture so far has elements, then it is time to insert a new element in the right place looks like). O (N ^ 2) is clear in this way. But I am thinking that it can help in sorting the elements of poset S, but in order to complete the elements in S, the sequence can not be made as ''. Not all pair elements (for example, {2,3} & amp; nbsp; {1,3}) can not be considered. Any ideas have been welcomed to improve the worst case complexity !! Thank you. PS: This is not a homework problem! This problem is usually said I believe your algorithm is wrong; While I do not have enough information to let you know that there is a skilled shortage to reduce the transit after the transitive closure, and for some time o (n ω ) The best known algorithm exponent ω & gt; 2.
Comments
Post a Comment