Add definition of r-partite graphs and in particular bipartite graphs #1299
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This PR adds the definition of r-partite graphs and in particular bipartite graphs, in
fsgraphTheory
.A graph is called r-partite if its vertex set admits a partition into r classes such that every edge has its ends in different classes (see, e.g., [1, p.17]). Using
partitions
andpart
frompred_setTheory
, the following definition can be made to precisely capture the textbook definition:Then the particularly important concept "bipartite graphs" can be defined as an overload:
The following theorem can be seen as a direct definition of bipartite graphs, where
A
andB
are the two partitions:P. S. This small work is mainly for our student projects (on
fsgraphTheory
) where only bipartite graphs are needed so far. The student may just define bipartite graphs directly while my this extra work can be used to replace the direct definition by the above equivalent theorem.Chun
[1] Diestel, R.: Graph Theory, 5th Electronic Edition (2016). Springer-Verlag, Berlin (2017).