Page 1 sur 1

find a relation (set) with XCAS

Publié : sam. sept. 28, 2019 4:22 pm
par compsystems
Hello BP
How do I solve the following problem with Xcas? I tried using the ASSUME () command but I can't get the answer

A := set[ 2, 4, 5, 6 ]; B := set[ 1, 2, 3, 5 ]
R = { ( b, a ) ∈ BxA / a <= 6 - 2*b }

R -> set[ ( 1, 2 ), ( 1, 4 ), ( 2, 2 ) ] // answer

Re: find a relation (set) with XCAS

Publié : sam. sept. 28, 2019 5:54 pm
par parisse
set[j for j in A*B if j[0]<=6-2*j[1]]

Re: find a relation (set) with XCAS

Publié : sam. sept. 28, 2019 6:25 pm
par compsystems
THANKS
Xcas ok
A_:=set[2,4,5,6];B_:=set[1,2,3,5]; set[j for j in B_*A_ if j[1]<=6-2*j[0]];
-> [[1,2],[1,4],[2,2]]