6. 6
q4=['b','s','y','j'];%value is 1
q5=['a','t','y','j'];%value is 0.6
q6=['c','s','y','i'];%value is 0.2
q=[q1;q2;q3;q4;q5;q6];
v=[0.4;0.6;0.9;1;0.6;0.2];
%%%%%The projections of Q on U1*U2*U4:
s=u3;
g=1;
for i=1:6
if (q(i,3)==s(1))
c1(g)=v(i);
g=g+1;
end
end
g=1;
for i=1:6
if (q(i,3)==s(2))
c2(g)=v(i);
g=g+1;
end
end
display('The projections of Q on U1*U2*U4 are')
disp(max(c1));
disp(max(c2));
%%%%%%%%%%%%%%proctions of u2*u4
u11=['s','i'];
u22=['s','j'];
u33=['t','i'];
u44=['t','j'];
uuu=[u11;u22;u33;u44];
for j=1:4
g=1;
7. 7
for i=1:6
if q(i,2)==uuu(j,1)&&uuu(j,2)==q(i,4)c4(g,j)=v(i);
g=g+1;
end
end
end
display('the projections of Q on U2*U4 are');
for i=1:4 disp(max(c4(:,i)));
end
%%%%%%%%%%%%%%proctions of u4
ppp4=['i','j'];
g=1
for i=1:6
if (q(i,4)==ppp4(1))c5(g)=v(i);
g=g+1;
end
end
g=1;
for i=1:6
if (q(i,4)==ppp4(2))c6(g)=v(i);
g=g+1;
end
end
display('the projections of on U4 are');
disp(max(c5));
disp(max(c6));
%%%%%%%%%%%%%%%%%%%%%
% cylindrical extantions are
display('mu(a,s,i)=mu(a,s,x,i)=mu(a,s,y,i) = ');
disp(max(c1));
display('mu(b,s,,x,j)=mu(b,s,,y,j)=mu(b,s,j) = ');
disp(max(c2));
% cylindrical extention of u2*u4 on u1*u2*u3*u4 are
for i=1:4
if i==1;
8. 8
display('mu(u1,s,u3,i)=mu(s,i)= ');
end
if i==2
display('mu(u1,s,u3,j)=mu(s,j)= ');
end
if i==3
display('mu(u1,t,u3,i)=mu(t,i)= ');
end
if i==4
display('mu(u1,t,u3,j)=mu(t,j)= ');
end
disp(max(c4(:,i)));
end
% cylindrical extention of Q on u4
display('mu(b,t,y,i)=mu(a,s,x,i)=mu(b,s,y,i)=c(c,s,y,i)=(a,t,y,i) ');
disp(max(c5));
display('mu(b,t,y,j)=mu(a,s,x,j)=mu(b,s,y,j)=c(c,s,y,j)=(a,t,y,j) ');
disp(max(c6));
The Output:
The projections of Q on U1*U2*U4 are
0.6000
1
the projections of Q on U2*U4 are
0.9000
1
0.4000
0.6000
g =
1
the projections of on U4 are
0.9000
1
mu(a,s,i)=mu(a,s,x,i)=mu(a,s,y,i) = 0.6000
10. 10
= 𝑚𝑎𝑥 {1,0,0,49}
= 1
clc;
clear all;
Q12=zeros(3,3);
Q1=[1 0 0.7;0.3 0.2 0 ; 0 0.5 1];
Q2=[0.6 0.6 0;0 0.6 0.1;0 0.1 0];
Q3=[1 0 0.7;0 1 0;0.7 0 1];
%%%Q1.Q2
for j=1:3
for i=1:3
Q12(j,i)=min(Q1(j,i),Q2(i,j));
end
end
display('Q1.Q2 is');
for i=1:3;
v1=max(Q12(i,:));
disp(v1);
end
%%%Q1.Q3
for j=1:3
for i=1:3
Q13(j,i)=min(Q1(j,i),Q3(i,j));
end
end
display('Q1.Q3 is');
for i=1:3
disp(max(Q13(i,:)));
end
%Q1.Q2.Q3
for j=1:3
for i=1:3
Q123(j,i)=min(Q12(1,i),Q3(i,j));
11. 11
end
end
display('Q1.Q2.Q3 is');
for i=1:3;
disp(max(Q123(i,:)));
end
The output: Q1.Q2 is 0.6000, 0.3000, 0.1000, Q1.Q3 is 1, 0.2000, 1, Q1.Q2.Q3 is 0.6000, 0,
0.6000
Exercise: 4.4
𝑇ℎ𝑒 𝐸𝑥𝑡𝑒𝑛𝑠𝑖𝑜𝑛 𝑃𝑟𝑖𝑛𝑐𝑖𝑝𝑙𝑒: 𝜇 𝐵 ( 𝑦) = max
𝑥 ∈ 𝑓−1(𝑦)
𝜇 𝐴 (𝑥)
𝑇ℎ𝑒 𝑟𝑎𝑛𝑔𝑒 𝑜𝑓 𝑓 ∶ {0,1, 4}
𝜇 𝐵 (0) = max
𝑥 ∈ 𝑓−1(0)
𝜇 𝐴 ( 𝑥) = 𝜇 𝐴 (0) = 0.8
𝜇 𝐵 (1) = max
𝑥 ∈ 𝑓−1(1)
𝜇 𝐴 ( 𝑥) = max { 𝜇 𝐴 (−1), 𝜇 𝐴 (1)} = max {0.5,1} = 1
𝜇 𝐵 (4) = max
𝑥 ∈ 𝑓−1(4)
𝜇 𝐴 ( 𝑥) = 𝜇 𝐴 (2) = 0.4
clc
clear all
A=[-1 0 1 2];
values=[0.5 0.8 1 0.4];
f=[0,1,4];
mu0=max(values(find(A==0)));
mu1=max((values(find(A==1))),values(find(A==-1)));
mu2=max((values(find(A==2))));
display('set f (A) using the extension principle')
The Output: set f (A) using the extension principle