Application Center - Maplesoft

App Preview:

Maple in Finite Topological Spaces-Connectedness

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application




``

 Basic Procedures

 

restart;

with(combinat):

 #(1)A procedure to generate a topology from a given subbasis S.

generaTe:=proc(X,S)

 local i,O,GT1,GT2,T,B;

    B:={};

    T:={{}};

 for O in S do

GT1:={seq(O intersect S[i],i=1..nops(S))} ; B:=B union GT1;

 od;

  B:=B union {X};

for O in B do

GT2:={seq(O union B[i],i=1..nops(B))};

  B:= B union GT2;

od;

 T union B;

end:

#(2)A procedure to check if a given collection over X is Topology or not .

CheckTopology:=proc(T)

local i,O,CT,CuT;

CT:={};

if not`subset`(T,powerset(X)) then false; else

for O in T do

CuT:={seq(O intersect T[i],i=1..nops(T)),seq(O union T[i],i=1..nops(T))};

CT:=CT union CuT;

od;

CT:=CT union {{},X};

evalb(CT=T);

fi;

end:

#A procedure to finds the clopen sets of the topology(T) [1] .

CO:=proc(X,T)NULL

local A,W;W:={};

for A in T do

if member(X minus A,T)then W:=W union{A};fi;

od;

W;

end:

 

 #A procedure to obtain the relative topology on a subset of X  [1].

 subspace:=proc(A,X,T)

map2(`intersect`,A,T);

end:

#A procedure to chek that if the topology is connected [1].

 isConn:=proc(X,T)

evalb(CO(X,T)={X,{}});

end:

 

#A procedure to find the connected components of a given point [1].

 K:=proc(x,X,T)
local i,S,SK;
SK:={};
S:=map2(`union`,{x},powerset(X));
for i to nops(S) do
if isConn(S[i],subspace(S[i],X,T)) then SK:=SK union S[i];fi;
od; SK ;
end:

Main*Procedures

#(i)A procedure to list all topologies on a finite set.

 ALLT:=proc(probableT)
local T,ALLTOPO;

ALLTOPO:={};

for T in probableT do

if CheckTopology(T)=true then ALLTOPO:=ALLTOPO union {T};else

ALLTOPO:=ALLTOPO;

fi;

od;

ALLTOPO;

end:

 

 #(ii)A procedure to list the connected topologies on a finite set X .

 AllConnected:=proc( AllTopologies)

local B,T;

B:={};

for T in AllTopologies do

if CO(X,T)={X,{}} then B:= B union {T}; else B:=B;

fi;

od;

B;

end:


#(iii)A procedure to find the connected components of a given space.

ALLCC:=proc(X,T)
local x,CC;
CC:={};
for x in X do
CC:=CC union {K(x,X,T)};
od;
CC;
end:




Demonstrations


X:={a};
 

 Y:=powerset(X):

 

 Z:=Y minus{{},X}:

 W:=powerset(Z):

 

 probableT:={seq(w union{{},X},w=W)}:

 

 nops(probableT):

Demonstrations

{a}

(1)

AllTopologies:=ALLT(probableT);

{{{}, {a}}}

(2)

print(`the number of topologies is`,nops(AllTopologies),`over a set with `,nops(X),`points`);

`the number of topologies is`, 1, `over a set with `, 1, points

(3)

Allconnectedtopologies:=AllConnected(AllTopologies);

{{{}, {a}}}

(4)

print(`there are `,nops(Allconnectedtopologies),`connected spaces on a set X with `,nops(X),`points` ):

`there are `, 1, `connected spaces on a set X with `, 1, points

(5)

NULL

X:={a,b};
 

{a, b}

(6)

Y:=powerset(X):
 

 Z:=Y minus{{},X}:

 W:=powerset(Z):

 probableT:={seq(w union{{},X},w=W)}:
 

 nops(probableT):

AllTopologies:=ALLT(probableT);

{{{}, {a, b}}, {{}, {a}, {a, b}}, {{}, {b}, {a, b}}, {{}, {a}, {b}, {a, b}}}

(7)

 

print(`the number of topologies is`,nops(AllTopologies),`over a set with `,nops(X),`points`);

`the number of topologies is`, 4, `over a set with `, 2, points

(8)

Allconnectedtopologies:=AllConnected(AllTopologies);

{{{}, {a, b}}, {{}, {a}, {a, b}}, {{}, {b}, {a, b}}}

(9)

print(`there are `,nops(Allconnectedtopologies),`connected spaces on a set X with `,nops(X),`points` );

`there are `, 3, `connected spaces on a set X with `, 2, points

(10)

NULL

X:={a,b,c};

{a, b, c}

(11)

Y:=powerset(X):

Z:=Y minus{{},X}:

 W:=powerset(Z):

probableT:={seq(w union{{},X},w=W)}:

nops(probableT):

AllTopologies:=ALLT(probableT);

{{{}, {a, b, c}}, {{}, {a}, {a, b, c}}, {{}, {b}, {a, b, c}}, {{}, {c}, {a, b, c}}, {{}, {a, b}, {a, b, c}}, {{}, {a, c}, {a, b, c}}, {{}, {b, c}, {a, b, c}}, {{}, {a}, {a, b}, {a, b, c}}, {{}, {a}, {a, c}, {a, b, c}}, {{}, {a}, {b, c}, {a, b, c}}, {{}, {b}, {a, b}, {a, b, c}}, {{}, {b}, {a, c}, {a, b, c}}, {{}, {b}, {b, c}, {a, b, c}}, {{}, {c}, {a, b}, {a, b, c}}, {{}, {c}, {a, c}, {a, b, c}}, {{}, {c}, {b, c}, {a, b, c}}, {{}, {a}, {b}, {a, b}, {a, b, c}}, {{}, {a}, {c}, {a, c}, {a, b, c}}, {{}, {a}, {a, b}, {a, c}, {a, b, c}}, {{}, {b}, {c}, {b, c}, {a, b, c}}, {{}, {b}, {a, b}, {b, c}, {a, b, c}}, {{}, {c}, {a, c}, {b, c}, {a, b, c}}, {{}, {a}, {b}, {a, b}, {a, c}, {a, b, c}}, {{}, {a}, {b}, {a, b}, {b, c}, {a, b, c}}, {{}, {a}, {c}, {a, b}, {a, c}, {a, b, c}}, {{}, {a}, {c}, {a, c}, {b, c}, {a, b, c}}, {{}, {b}, {c}, {a, b}, {b, c}, {a, b, c}}, {{}, {b}, {c}, {a, c}, {b, c}, {a, b, c}}, {{}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c}}}

(12)

print(`the number of topologies is`,nops(AllTopologies),`over a set with `,nops(X),`points`);

`the number of topologies is`, 29, `over a set with `, 3, points

(13)

Allconnectedtopologies:=AllConnected(AllTopologies);

{{{}, {a, b, c}}, {{}, {a}, {a, b, c}}, {{}, {b}, {a, b, c}}, {{}, {c}, {a, b, c}}, {{}, {a, b}, {a, b, c}}, {{}, {a, c}, {a, b, c}}, {{}, {b, c}, {a, b, c}}, {{}, {a}, {a, b}, {a, b, c}}, {{}, {a}, {a, c}, {a, b, c}}, {{}, {b}, {a, b}, {a, b, c}}, {{}, {b}, {b, c}, {a, b, c}}, {{}, {c}, {a, c}, {a, b, c}}, {{}, {c}, {b, c}, {a, b, c}}, {{}, {a}, {b}, {a, b}, {a, b, c}}, {{}, {a}, {c}, {a, c}, {a, b, c}}, {{}, {a}, {a, b}, {a, c}, {a, b, c}}, {{}, {b}, {c}, {b, c}, {a, b, c}}, {{}, {b}, {a, b}, {b, c}, {a, b, c}}, {{}, {c}, {a, c}, {b, c}, {a, b, c}}}

(14)

print(`there are `,nops(Allconnectedtopologies),`connected spaces on a set X with `,nops(X),`points` );

`there are `, 19, `connected spaces on a set X with `, 3, points

(15)

#All connected components;


X:={a,b,c,d};

{a, b, c, d}

(16)

T:={{},X};

{{}, {a, b, c, d}}

(17)

ALLConnected_Components:=ALLCC(X,T);

{{a, b, c, d}}

(18)


X:={a,b,c,d};

{a, b, c, d}

(19)

T:=powerset(X);

{{}, {a}, {b}, {c}, {d}, {a, b}, {a, c}, {a, d}, {b, c}, {b, d}, {c, d}, {a, b, c}, {a, b, d}, {a, c, d}, {b, c, d}, {a, b, c, d}}

(20)

ALLConnected_Components:=ALLCC(X,T);

{{a}, {b}, {c}, {d}}

(21)


X:={a,b,c,d};

{a, b, c, d}

(22)

T:={{},{a},{a,b},{c,d},{a,c,d},X};

{{}, {a}, {a, b}, {c, d}, {a, c, d}, {a, b, c, d}}

(23)

ALLConnected_Components:=ALLCC(X,T);

{{a, b}, {c, d}}

(24)

``

``

``

``

``

 

NULL