Iahub recently learn Bubble Sort algorithm sort permutation n element a1 a2 ascend order he bore simple algorithm invent graph the graph let G initially n vertex 0 edge during bubble Sort execution edge appear describe follow algorithm pseudocode procedure bubbleSortGraph build graph G n vertex 0 edge repeat swap false 1 n 1 inclusive ai ai 1 add undirected edge G ai ai 1 swap ai ai 1 swap true end end swap repeat algorithm long swap value true end procedurefor graph independent set set vertex graph adjacent edge vertice independent set a maximum independent set independent set maximum cardinality give permutation find size maximum independent set graph G use permutation premutation procedure bubblesortgraph