约翰逊图的矩阵阵列是什么样的? [英] What does a matrix array look like for a Johnson graph?

查看:106
本文介绍了约翰逊图的矩阵阵列是什么样的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎找不到关于约翰逊图的矩阵数组的任何示例(或根本没有很多信息)。谁能给我发送一个有关其数组外观的示例吗?

I can't seem to find any examples (or much information at all) of what a matrix array looks like for a Johnson graph. Can anyone send me an example of what their arrays look like?

推荐答案

这直接使用此处给出的Johnson Graph的定义< a href = https://en.wikipedia.org/wiki/Johnson_graph rel = nofollow noreferrer> Wiki Johnson图

This directly uses the definition of a Johnson Graph given here Wiki Johnson Graph

johnsonmatrix[n_, k_] := Module[{s=Select[Subsets[Range[n]], Length[#]==k&]},
  {s, MatrixForm[Table[If[Length[Intersection[s[[i]], s[[j]]]]==k-1, 1, 0],
  {i, Length[s]}, {j, Length[s]}]]}]

并生成子集列表,这些子集索引邻接矩阵的行和列,后跟邻接矩阵

and generates the list of subsets which index the rows and columns of the adjacency matrix followed by the adjacency matrix for the graph.

例如,前几个 johnsonmatrix [n,1] 生成具有n个顶点和<$的完整图c $ c> johnsonmatrix [5,2] 匹配该维基页面右上角示例图中给出的顶点和边的数量,并且每个顶点都有六个入射边。但是我没有手动检查以确保该矩阵与所示的图是同构的。

For example, the first few johnsonmatrix[n,1] generate the complete graphs with n verticies and johnsonmatrix[5, 2] matches the number of verticies and edges given in the example graph in the upper right corner of that wiki page and every vertex has six incident edges. But I haven't manually checked to make absolutely certain that this matrix is isomorphic to the graph shown.

请仔细检查以确保没有错误滑入。

Please check this carefully to try to make certain that no errors have slipped in.

这篇关于约翰逊图的矩阵阵列是什么样的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆