Notes on graphs and git remotes.

c-declarations
Joshua Potter 2024-05-13 12:11:54 -06:00
parent c574e3363d
commit b865693d9d
8 changed files with 215 additions and 6 deletions

View File

@ -124,7 +124,10 @@
"array-1d-col-major.png", "array-1d-col-major.png",
"array-multi-row-major.png", "array-multi-row-major.png",
"array-multi-col-major.png", "array-multi-col-major.png",
"graph-isomorphic.png" "graph-isomorphic.png",
"graph-induced-subgraph.png",
"graph-subgraph.png",
"graph-non-subgraph.png"
], ],
"File Hashes": { "File Hashes": {
"algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8",
@ -305,7 +308,7 @@
"_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b",
"set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53",
"set/index.md": "f2e907b2643cd4e5023169dcd96ca828", "set/index.md": "f2e907b2643cd4e5023169dcd96ca828",
"set/graphs.md": "cf371ca94c97ec1f33fbd6081985699f", "set/graphs.md": "4bbcea8f5711b1ae26ed0026a4a69800",
"_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb",
"_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391", "_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391",
"awk/variables.md": "e40a20545358228319f789243d8b9f77", "awk/variables.md": "e40a20545358228319f789243d8b9f77",
@ -324,7 +327,7 @@
"_journal/2024-03/2024-03-21.md": "cd465f71800b080afa5c6bdc75bf9cd3", "_journal/2024-03/2024-03-21.md": "cd465f71800b080afa5c6bdc75bf9cd3",
"x86-64/declarations.md": "75bc7857cf2207a40cd7f0ee056af2f2", "x86-64/declarations.md": "75bc7857cf2207a40cd7f0ee056af2f2",
"x86-64/instructions.md": "eef92b487920c7a15f38955c97a48a2d", "x86-64/instructions.md": "eef92b487920c7a15f38955c97a48a2d",
"git/refs.md": "954fc69004aa65b358ec5ce07c1435ce", "git/refs.md": "e20c2c9b14ba6c2bd235416017c5c474",
"set/trees.md": "0d21b947917498f107da140cc9fb93a7", "set/trees.md": "0d21b947917498f107da140cc9fb93a7",
"_journal/2024-03-24.md": "1974cdb9fc42c3a8bebb8ac76d4b1fd6", "_journal/2024-03-24.md": "1974cdb9fc42c3a8bebb8ac76d4b1fd6",
"_journal/2024-03/2024-03-23.md": "ad4e92cc2bf37f174a0758a0753bf69b", "_journal/2024-03/2024-03-23.md": "ad4e92cc2bf37f174a0758a0753bf69b",
@ -423,7 +426,10 @@
"_journal/2024-05/2024-05-09.md": "2339530b1654a2e8e96d908ecb91b8d1", "_journal/2024-05/2024-05-09.md": "2339530b1654a2e8e96d908ecb91b8d1",
"_journal/2024-05/2024-05-08.md": "0f1b1b9e2abcf3203b511b9e034e86f4", "_journal/2024-05/2024-05-08.md": "0f1b1b9e2abcf3203b511b9e034e86f4",
"_journal/2024-05/2024-05-07.md": "4b1dde039a251f9a6dc7e606de98616d", "_journal/2024-05/2024-05-07.md": "4b1dde039a251f9a6dc7e606de98616d",
"_journal/2024-05/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7" "_journal/2024-05/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7",
"_journal/2024-05-13.md": "2dfa53ff061ba94fcbe45261aad6bb30",
"_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365",
"git/remotes.md": "2208e34b3195b6f1ec041024a66fb38b"
}, },
"fields_dict": { "fields_dict": {
"Basic": [ "Basic": [

View File

@ -6,4 +6,7 @@ title: "2024-05-13"
- [x] KoL - [x] KoL
- [ ] Sheet Music (10 min.) - [ ] Sheet Music (10 min.)
- [ ] Go (1 Life & Death Problem) - [ ] Go (1 Life & Death Problem)
- [ ] Korean (Read 1 Story) - [ ] Korean (Read 1 Story)
* Notes on [[graphs#Subgraphs|subgraphs]] and induced subgraphs.
* Notes on [[remotes]].

View File

@ -11,7 +11,7 @@ tags:
A **reference** (or **ref**) is essentially a file containing an oid. The name of the file can then be used to reference the oid. A **symbolic reference** is a file containing the name of another reference. The primary refs are: A **reference** (or **ref**) is essentially a file containing an oid. The name of the file can then be used to reference the oid. A **symbolic reference** is a file containing the name of another reference. The primary refs are:
* heads (i.e. branches) * heads (i.e. branches)
* remotes (i.e. remote branches) * [[remotes]] (i.e. remote branches)
* [[objects#Tags|tags]] * [[objects#Tags|tags]]
%%ANKI %%ANKI

59
notes/git/remotes.md Normal file
View File

@ -0,0 +1,59 @@
---
title: Remotes
TARGET DECK: Obsidian::STEM
FILE TAGS: git
tags:
- git
---
## Overview
A **remote** is a version of the project different from the one currently on. Remotes are stored in `.git/config`. List remotes using the following command:
```sh
$ git remote -v
```
%%ANKI
Basic
What is a remote repository?
Back: A version of the repository located *somewhere* else.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1715623927181-->
END%%
%%ANKI
Basic
What misnomer may be associated with a remote repository?
Back: A remote could exist on the same machine as the referencing repo.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1715623927187-->
END%%
%%ANKI
Basic
Where are git remotes specified within the `.git` directory?
Back: In `.git/config`
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1715623927191-->
END%%
%%ANKI
Basic
What two properties are initialized when creating a new git remote?
Back: The URL and fetch refspec.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1715623927194-->
END%%
%%ANKI
Basic
What kind of git refs are associated with remotes?
Back: Remote branch refs.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1715623927197-->
END%%
## Bibliography
* Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).

View File

@ -1149,6 +1149,147 @@ Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n
<!--ID: 1715543813492--> <!--ID: 1715543813492-->
END%% END%%
## Subgraphs
We say $G' = (V', E')$ is a **subgraph** of $G = (V, E)$ provided $V' \subseteq V$ and $E' \subseteq E$. We say $G' = (V', E')$ is an **induced subgraph** of $G = (V, E)$ provided $V' \subseteq V$ and every edge in $E$ whose vertices are still in $V'$ is also an edge in $E'$.
%%ANKI
Basic
What *is* a subgraph of $G = (V, E)$?
Back: A graph $G' = (V', E')$ such that $V' \subseteq V$ and $E' \subseteq E$.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756612-->
END%%
%%ANKI
Basic
What *is* an induced subgraph of $G = (V, E)$?
Back: A graph $G' = (V', E')$ such that $V' \subseteq V$ and every edge in $E$ whose vertices are in $V'$ is in $E'$.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756617-->
END%%
%%ANKI
Basic
Which of subgraphs or induced subgraphs are more general?
Back: Subgraphs.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756621-->
END%%
%%ANKI
Basic
Is an induced subgraph a subgraph?
Back: Yes.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756626-->
END%%
%%ANKI
Basic
Is a subgraph an induced subgraph?
Back: Not necessarily.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756630-->
END%%
%%ANKI
Basic
How can deletion be used to create a subgraph from a graph?
Back: By deleting vertices (with connected edges) as well as any additional edges.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756634-->
END%%
%%ANKI
Basic
How can deletion be used to create an induced subgraph from a graph?
Back: By only deleting vertices and their connected edges.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715619756637-->
END%%
%%ANKI
Basic
Is the second graph a subgraph of the first?
![[graph-induced-subgraph.png]]
Back: Yes.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447931-->
END%%
%%ANKI
Basic
Is the second graph an induced subgraph of the first?
![[graph-induced-subgraph.png]]
Back: Yes.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447935-->
END%%
%%ANKI
Basic
Is the second graph a subgraph of the first?
![[graph-subgraph.png]]
Back: Yes.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447939-->
END%%
%%ANKI
Basic
Is the second graph an induced subgraph of the first?
![[graph-subgraph.png]]
Back: No.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447942-->
END%%
%%ANKI
Basic
Why isn't the second graph an induced subgraph of the first?
![[graph-subgraph.png]]
Back: The second graph is missing edge $\{a, b\}$.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447946-->
END%%
%%ANKI
Basic
Is the second graph a subgraph of the first?
![[graph-non-subgraph.png]]
Back: No.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447949-->
END%%
%%ANKI
Basic
Why isn't the second graph a subgraph of the first?
![[graph-non-subgraph.png]]
Back: Edge $\{c, f\}$ is not in the first graph.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447952-->
END%%
%%ANKI
Basic
Is the second graph an induced subgraph of the first?
![[graph-non-subgraph.png]]
Back: No.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447955-->
END%%
%%ANKI
Basic
Why isn't the second graph an induced subgraph of the first?
![[graph-non-subgraph.png]]
Back: Because the second graph isn't even a subgraph of the first.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715620447958-->
END%%
## Bibliography ## Bibliography
* Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf). * Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB