Consider a list of fractional numbers written in binary form. Use it to programmatically generate a number in the same form, but that does not already exist in the list, by flipping bits from 0 to 1 and 1 to 0, along the diagonal, as we did in our proof that the real numbers are uncountable. (Assume that the lone digit before the decimal point is a 0.) For example. for the following list.
0.0.10011 0.1Q1010 0.111000 0.000111 0.111111 0.111002
The generated number in this case would be: C • 1 nc )1 Problem 1 b: You are given a file with two lines of input. each of which represents a language. The words of the language will be separated by spaces. We will call the first line X and the second line Y. Your program should compute:
Union: X U Y Intersection: X 11 Y Difference: X – Y Symmetric Difference X A Y Cartesian Product X x Y Power Set P(X)
For example, if your file is a ab abc abcd a bb ccc dddd
Sample Solution