f********i 发帖数: 563 | 1 现有一个问题,算是集合领域的一个应用:
Set1 = { u | u = a0*x0 + a1*x1 + a2*x2 + a3*x3 }
Set2 = { v | v = b0*y0 + b1*y1 + b2*y2 + b3*y3 }
其中 ai 和 bi是常系数,已知。 而 x 和 y 是未知数(整数),但范围已知。想知道
Set2是否是Set1的子集。
注: 未知数x的个数可以是arbitary的,但是x和y的个数必须一致,如上面的4个。也
可以是2个,如下面的例子,但在解题的时候,其个数以及各自的系数,都是已知的。
举个例子:
Set1 = { u | u = 8*x0 + 1*x1 } 其中: 0 <= x0 <= 3, 0 <= x1 <= 3
Set2 = { v | v = 1*y0 + 8*y1} 其中: 0 <= y0 <= 2, 0<= y1 <= 1
经计算: Set1 = { 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27 }
而 Set2 = { 0, 1, 2, 8, 9, 10 }
故而 S | s*****d 发帖数: 43 | 2 Is your example typical?
In you example,
8x0 + 1x1 and 1y0 + 8y1 are the same equation, just write it this way:
set1 = {1x1 + 8x0}
set2 = {1y0 + 8y1}
Since set of x1 includes set of y0, and set of x0 includes set of y1,
set1 must include set2. |
|