i want to calculate symmetric difference between two set V(i,ip) and v(ipp,ippp)
i have set i={1,3,4,6} and j={1,2,..,10} i have set T(i,j) and , 3 set V,W,b too , that
T(1)={2,5,10}
T (3)={7,10}
T (4)={2,5,6}
T (6)={2,5}
and V is union of T(i) , W is symmetric difference between T and V , and b is a difference between V(i,ip)
the result of my b is not true! why ?
how can i get difference between V(i,ip)?
v(i,ip)=t(i,j)+t(ip,j)
w(i,ip,ipp)= (t(i,j)+v(ip,ipp,j))-(t(i,j)*v(ip,ipp,j));
b(i,ip,ipp,ippp)=((v(i,ip,j)+v(ipp,ippp,j))-(v(ip,ipp,j)*v(ipp,ippp,j))) ;
*---- index and sets----*
sets
i /1,3,4,6/
j/1*10/
t(i,j) /
1.(2,5,10)
3.(7,10)
4.(2,5,6)
6.(2,5)
/ ;
alias(i,ip,ipp,ippp);
*---- parameter----*
parameter
MyOrd(i,ip);
*-------------------------------
MyOrd(i,ip)=i.val+(ip.val -1)*4;
set
v(i,ip,j)'for union only'
b(i,ip,ipp,ippp,j) 'symmetric diffrence between v and v'
w(i,ip,ipp,j) 'symmetric diffrence between t and v'
;
v(i,ip,j)$(i.val<ip.val)=t(i,j)+t(ip,j);
w(i,ip,ipp,j)$(ip.val<ipp.val) =(t(i,j)+v(ip,ipp,j))-(t(i,j)*v(ip,ipp,j));
b(i,ip,ipp,ippp,j)$(i.val<ip.val and ipp.val<ippp.val and MyOrd(i,ip)
display t,v,w,b;