lexicographic order

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

lexicographic order

econ14
Q1.Let A = {0, 1} × {0, 1} and B = {a, b, c}. Suppose A is listed in lexicographic order
based on 0 < 1 and B is in alphabetic order. If A × B × A is listed in lexicographic
order, then the next element after ((1, 0), c,(1, 1)) is
(a) ((1, 0), a,(0, 0))
(b) ((1, 1), c,(0, 0))
(c) ((1, 1), a,(0, 0))
(d) ((1, 1), a,(1, 1))
(e) ((1, 1), b,(1, 1))


Q2
Let A = {0, 1} × {0, 1} × {0, 1} and B = {a, b, c} × {a, b, c} × {a, b, c}. Suppose A
is listed in lexicographic order based on 0 < 1 and B is listed in lexicographic order
based on a < b < c. If A×B ×A is listed in lexicographic order, then the next element
after ((0, 1, 1),(c, c, c),(1, 1, 1)) is
(a) ((1, 0, 1),(a, a, b),(0, 0, 0))
(b) ((1, 0, 0),(b, a, a),(0, 0, 0))
(c) ((1, 0, 0),(a, a, a),(0, 0, 1))
(d) ((1, 0, 0),(a, a, a),(1, 0, 0))
(e) ((1, 0, 0),(a, a, a),(0, 0, 0))
Reply | Threaded
Open this post in threaded view
|

Re: lexicographic order

Granpa Simpson
1) The ordering of A is as follows:
A={(0,0),(0,1),(1,0),(1,1)}
B={a,b,c}
The lexicographic ordering of AxBxA is as follows:
AxBxA={(0,0),a,(0,0)},{(0,0),a,(0,1)},{(0,0),a,(1,0)},{(0,0),a,(1,1)}......................................................{(1,1),c,(1,1)}.
Use this logic and you will get the next after {(1,0),c,(1,1)} as {(1,1),a,(0,0)}.
Others plz do check..!!!!
 "I don't ride side-saddle. I'm as straight as a submarine"
Reply | Threaded
Open this post in threaded view
|

Re: lexicographic order

Granpa Simpson
In reply to this post by econ14
Similarly for question 2 u will get the answer as e i.e {(1,0,0),(a,a,a),(0,0,0)}.
 "I don't ride side-saddle. I'm as straight as a submarine"