# subhojitmaji/daa-project-report architecture

> Architecture diagram of the GitHub repository subhojitmaji/daa-project-report, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/subhojitmaji/daa-project-report
- Repository: https://github.com/subhojitmaji/daa-project-report

## Overview

This small Python project computes a minimum distance-2 dominating set for a rooted tree. Its example runner calls the solver, which builds adjacency, uses BFS to derive parent/depth order, then greedily selects vertices and marks their distance-two neighborhoods covered before returning the selected set. The implementation is contained in one file; the stages shown are internal steps of that function, not separate modules.

Main entry points: [`code.py`](https://github.com/subhojitmaji/daa-project-report/blob/main/code.py) (Dominating-set solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_example["Example runner<br/>[code.py]"]
node_solver["Dominating-set solver<br/>[code.py]"]
node_bfs["BFS ordering<br/>[code.py]"]
node_greedy["Greedy coverage<br/>[code.py]"]

node_example -->|"calls"| node_solver
node_solver -->|"computes order"| node_bfs
node_solver -->|"selects and covers"| node_greedy
node_solver -->|"returns result"| node_example

click node_example "https://github.com/subhojitmaji/daa-project-report/blob/main/code.py"
click node_solver "https://github.com/subhojitmaji/daa-project-report/blob/main/code.py"
click node_bfs "https://github.com/subhojitmaji/daa-project-report/blob/main/code.py"
click node_greedy "https://github.com/subhojitmaji/daa-project-report/blob/main/code.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_example,node_solver,node_bfs,node_greedy toneTeal
```

## Components

### Other components

- [Example runner](https://github.com/subhojitmaji/daa-project-report/blob/main/code.py): `code.py`
- [Dominating-set solver](https://github.com/subhojitmaji/daa-project-report/blob/main/code.py): `code.py`
- [BFS ordering](https://github.com/subhojitmaji/daa-project-report/blob/main/code.py): `code.py`
- [Greedy coverage](https://github.com/subhojitmaji/daa-project-report/blob/main/code.py): `code.py`

## Connections

- Example runner → Dominating-set solver: calls (evidence: `code.py`)
- Dominating-set solver → BFS ordering: computes order (evidence: `code.py`)
- Dominating-set solver → Greedy coverage: selects and covers (evidence: `code.py`)
- Dominating-set solver → Example runner: returns result (evidence: `code.py`)
