mathematica 递阶结构模型的建立
为了保证程序不出错 这里贴的是代码格式而非纯文本 请粘贴到mathematica中后阅读
m = ( {
{1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], \[Placeholder], \[Placeholder]},
{1, 1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], \[Placeholder]},
{\[Placeholder], \[Placeholder], 1, 1, 1, 1, \[Placeholder]},
{\[Placeholder], \[Placeholder], \[Placeholder], 1, 1,
1, \[Placeholder]},
{\[Placeholder], \[Placeholder], \[Placeholder], \[Placeholder],
1, \[Placeholder], \[Placeholder]},
{\[Placeholder], \[Placeholder], \[Placeholder], 1, 1,
1, \[Placeholder]},
{1, 1, \[Placeholder], \[Placeholder], \[Placeholder], \
\[Placeholder], 1}
} ) /. \[Placeholder] -> 0;
r = Flatten[Position[#, 1] & /@ m, {3, 1}](*可达集*)
a = Flatten[Position[#, 1] & /@ [email protected], {3, 1}](*先行集*)
c = MapThread[Intersection, {r, a}](*共同集*)
b = [email protected][MapThread[Equal, {c, a}], True]
r=DeleteCases[r,[email protected]@b,2](*删去已分层要素*)
a=DeleteCases[a,[email protected]@b,2]
[email protected][MapThread[Equal,{c,a}],True]