init
Prithu Goswami prithugoswami524@gmail.com
Wed, 01 Jan 2020 01:15:28 +0530
62 files changed,
2938 insertions(+),
0 deletions(-)
jump to
A
arm-sloss/01_arm_embedded_systems.md
@@ -0,0 +1,216 @@
+## The RISC Design Philosophy +- Aimed at delivering **simple** but **powerful** instruction set that + execute within a **single cycle**. +- Reduces the complexity of the instructions and places great demands on the + compiler. Therefore it relies more on software compared to CISC (Complex + Instruction Set) that has more complex hardware +- The complexity is shifted to the software end rather than keeping in + hardware, as it is easier to develop complexity in software. +- Less complexity in hardware = faster hardware\ + ![](img/1.1.png){width=50%}\ + **Four Rules of the philosophy** + 1. *Instructions* + - Provide simple operations that can each execute in a **single cycle**. + - The compiler needs to synthezide complex operatoiions, leaving it to + the compiler to manage complexity rather than the hardware. + 2. *Pipelines* + - Executing instructions in **parrallel** is done by piplining. + - As the instrucitons are all **fixed length** (single cycle required), + piplining can fetch the next instruction before the current is decoded + - No need for an instruction to have microcode execution. + 3. *Registers* + - RISC machines have a large general-purpose registers. + - Any register can contain any data or an address. it's not fixed like + CISC. + 4. *load-store architecture* + - All data comes from registers **only**, therefore **Separate load + and store instructions** do the job of transfering data between the + registers and the memory. + - The data on the register can accessed multiple times without + requring multiple memory access. + - CISC on the other hand have operations that access memory directly. + +## ARM Design Philosophy +- ARM designed mainly for embedded applications, therefore there are many +constraints that have influenced it's design. + 1. **Low power consumption** -- usually embedded systems run on batteries/ + low power source + 2. **High code density** -- limited storage space in embedded devices due + to high cost and limited space. +- It's not pure RISC due to its application restrictions -- embedded system. + It uses a **modified RISC design** to make it better suited for embedded + applications. +- **Non-RISC features of ARM** + * *Variable cycle execution for certain instructions* + - load-store-multiple instruction use multiple cycles. Depends on the no. + of registers being trasfered. + - **Code density is imporved** as multiple register transfers are common. + * *Inline barrel shifter leading to more complex instructoins* + - A component that pre-processes the registers before it's used + - It **expands the capabilities of instructions and improves code density** + * *Thumb 16-bit instruction set* + - Permits to execute either 16 or 32 bit which **improves code density** + - Eg. **Cheaper memory of 16bit** can be used with 16bit instruction which + also **improves performance** as only a single fetch is requrired to load + the instruction. 32bit requires two fetches. + * *Conditional execution* + - Reduces branch instructions, **improving performance & code density** + * *Enhanced instructions* + - DSP (Digital Signal Processor) added to ARM instruction to allow fast + 16 x 16-bit multiplier operations + - Allow faster-performing ARM processor by replacing the combination of + a processor plus a DSP. + +## Embedded System Hardware +![](img/1.2.png){width=60%} + +- **ARM Processor** controls the embedded device, contains the core that + executes instructions and interacts with other components. +- **Controllers** coordinates important functional blocks. Interrupt controller +and memory controllers +- **Peripherals** provide input/output capability +- **Busses** used to communicate with the different components. + +**ARM Bus Technology** + +- On a x86 PCs, the bus tech used is PCI that connects video cards, audio + controller, etc, The PCI Bus is on the motherboard +- Embedded devices use an on-chip bus that is **internal to the chip** and +that allows different peripherals to be interconnected with an ARM core. +- Two types of device classes connected to the bus: + - *Bus Master* -- A device that can initiate a data transfer. The ARM core is +the bus master + - *Bus Slave* -- A device only capable of responding to transfer request + +**AMBA Bus Protocol** + +- **Advanced Microcontroller Bus Architecture** widely adopted for the on-chip +bus of the ARM processors +- ARM introduced ASB (ARM System Bus), APB (ARM Peripheral Bus) and later +ARM High Performance Bus +- There are many peripherals that use the AMBA interfaces so it makes easy +for hardware developers incorporates them in their designs. +- AHB provides higher data throughput compared to ASB because of it's +centralised multiplexed bus scheme, rather bidirectional design of ASB +- Multilayer AHB can have many bus masters. AHB-Lite can only have one bus +master. AHB-Lite is a subset of the standard AHB bus. Multilayer AHB good +for systems with multiple processor. + +**Memory** + +- *Hierarchy* + - `Cache -> Primary memory -> Secondary memory` + - Cache provides overall increase in performance but with loss of + predictable execution time, hence is no use in real-time systems. + - A real-time system must be able to respond in time and for that it must + know exactly how long operations will take.\ + ![](img/1.3.png){width=25%} +- *Types* + - **ROM** - Mainly used to hold the boot code. There are Flash ROMs as well + that allow writing as well but the write process is slow. Their main use + is holding the **firmware** and some **long-term data** + - **DRAM** - Dynamic RAM made of storage cells that have to constantly be + refreshed every few milliseconds. + - **SRAM** - Static in the sense that it doesn't need to be dynamically + refreshed. Faster than DRAM and also costlier. + - **SDRAM** - Synchronous DRAM. Synchronizes with the processor clock. + Internally data is fetched from memory cells and brought out in a burst. + +**Peripherals** + +- A peripheral device provides I/O to the chip by providing a connection to +external devices. +- The peripheral devices are on-chip and provide an interface to the external +devices. Eg. A USB peripheral device will provide the interface for the USB +ports. +- ARM peripherals are *memory-mapped* and provide a programming interface. +- **Controllers** are specialized peripherals that implement higher level +functionality + - **Memory Controllers** + - They connect the different types of memories to the bus and provide + sort of an interface. + - On power-up they are configured to activate some memory device that + help *initialization code* to execute. + - **Interrupt Controllers** + - 2 types -- *Standard* and *Vector Interrupt Controller* + - *Standard* provides a signal to the core if an external device needs + servicing. The interrupt handler determimes which device requries + servicing depeding on the *device bitmap register* in the intterup + controller + - *VIC* is more powerful as it prioritizes interrupts and simplifies + determination of which device caused interrupt. It assigns priority and + handler address to each interrupt and signals the core only if the + priority of the new interrupt is higher than the currently executing + interrupt handler. It can either call the standard interrup handler that + can load the address of the handler for the device or can directly cause + the core to jump to the handler for the device. + +## Embedded System Software +![Software abstraction layers](img/1.4.png){width=35%} + +- Initialization code is the first code executed which sets up the minimum +parts of the board before handing control over to the operating system. +- The OS provides the infrastructure for the applications to run and manages +system resources. +- Embedded devices usually don't require a full-blown OS, a mere task-scheduler +is sufficient most times +- The initialization code is usually stored in the ROM and is called the +**firmware**. +- Drivers provide standard interfaces to peripherals. + +**Initialization (Boot) Code** + +- Configures system resources, memory controller, processor caches and +initializes some devices on startup +- it handles administrative tasks in 3 phases: + 1. **Initial hardware configuration** + - Involves setting up the target platform (the hardware) so it can boot + the OS image. + - Configuring involves reorganizing the memory in order to meet the + requirements/standards of the boot image. + - Many Operating systems expect a known memory layout and hence it is important + that the layout be setup during the initialization code. Figure 2 shows + the memmory remapping process.\ + + ![Memory Remapping](img/1.5.png){width=40%} + + 2. **Diagnostics** + - Testing the system by exercising the hardware to check whether it's in + working order. + - It also tracks down problems and may give out diagnostic reports to + the programmer. + 3. **Booting** + - Involves loading an image and handing control over to it. + - Loading an Image means copying over an entire program including code and + data into RAM. Once loaded the system (initializing code) hands over + control by **modifying the program counter** to point to the start of the + image. Decompression may also take place if the OS image is compressed. + +**Operating System** + +- The firmware code/Initialization code **prepares the hardware** for an +operating system to take control. +- An Operating System organizes the system resources: peripherals, memory, +and processing time (job scheduling). +- Operating system control the **resourses/infrastructure** so that they +can be efficiently used by the applications running on it. +- The Operating system provides a common environment to the applications +- **Real-Time Operating Systems (RTOSs)** + - They provide guaranteed response times of events. + - Systems running RTOs tend to lack a secondary storage. + - Real-Time applications require RTOs +- **Platform Operating System** + - They have a Memory Management Unit to run large, non-realtime applications + and have a secondary storage. +- But there can be OS with characteristics of both. +- ARM has developed cores that target each category of OS/Application. + +**Applications** + +- The OS provides platform resources for applications to run. Many application +can run simultaneously. +- **Networking** -- Home gateways, DSL Modems, 802.11 wireless communication +- **Mobile phones are the largest application area for ARM** +- **Mass storage** - hard drives, **Imaging** - Ink Jet printers +- ARM was not designed to work in applications that require leading-edge high +performance.
A
automata-rich/02_languages_and_strings.md
@@ -0,0 +1,209 @@
+--- +geometry: +- lmargin=0.9in +- rmargin=0.175in +- tmargin=0.3in +- bmargin=0.5in +- twoside +papersize: a4 +classoption: +- twocolumn +... + +## Strings +### Definitions +- **Alphabet ($\Sigma$)**\ + A a **finite set** consiting of symbols or characters. +- **String**\ + A **sequence** of symbols drawn from some alphabet $\Sigma$. A string can + be empty, denoted by $\epsilon$ +- **$\boldsymbol\Sigma$\***\ + Denotes the set of **all possible strings** over an alphabet $\Sigma$$\*$ + +### Functions on a string +- **length**\ + $|\epsilon|=0$\ + $|100111|=6$ +- **character occurences**\ + $\#_a$(`abbaa`) = 3 +- **concatenation**\ + $x = good$, $y = bye$\ + $xy=goodbye$, $yx=byegood$\ + Also, $x||y\ = goodbye$ (Another notation)\ + \- The empty string $\epsilon$ is the identity of the concatenation. + $$\forall x(x\epsilon = \epsilon x = x)$$ + \- Concatentation is also associative. $$\forall s,t,w\ ((st)w = s(tw))$$ +- **replication**\ + $$w^0 = \epsilon$$ $$w^i = w^{i-1} w$$ + $a^3 = aaa$ , $(bye)^2 = byebye$ , $a^0b^3 = bbb$ +- **reversal**\ + For a string $w$, the reversal $w^R$ is defined as: + \begin{equation}\notag + \text{if }|w| = 0 \text{ then } w^R = w = \epsilon + \\[-0.3in] + \end{equation} + + \begin{equation}\notag + \begin{split} + &\text{if }|w| \geq 1 \text{ then } \exists a \in \Sigma(\exists u \in + \Sigma^\ast (w = ua))\\ + &\text{then } w^R = au^R + \end{split} + \end{equation} + +### Theorem 2.1 +If $w$ and $x$ are strings, then $(wx)^R=x^Rw^r$ + +### Relations on Strings +- **substring**\ + A string $s$ is a substring of a string $t$ iff $s$ occurs contiguously as + a part of $t$\ + A string $s$ is a **proper substring** of a string $t$ iff $s$ is a + substring of $t$ and $\bold{s \neq t}$ +- **prefix**\ + A string *s* is a prefix of *t* iff $\exists x \in \Sigma^\ast(t = sx)$\ + **proper prefix** again same as above ($\bold{s \neq t}$) +- **suffix**\ + A string *s* is a suffix of *t* iff $\exists x \in \Sigma^\ast(t = xs)$\ + **proper suffix** again same as above ($\bold{s \neq t}$) + +**Empty string $\epsilon$ is a suffix, prefix and a substring of every string** + +## Languages + +A **language** is a **finite or infinite set of strings** over a fine alphabet +$\Sigma$.\ +For a language *L* defined over alphabet $\Sigma$, $L\subset \Sigma^\ast$\ +$\Sigma_L$ is used to denote the alphabet from which the strings in the +language *L* are formed. + +### Ways of defining languages +- We can have a **language generator** that **enumerates** the elements of the +language or have **language recognizer** which **decides** whether or not a +candidate string is in the language and returns *True* if it is and *False* +if it isn't. + +- **Go through examples on page 11-13 to see different ways languages +are defined** +- Empty language $L = \{\}$ = $\varnothing$ is a language that contains no +strings but a language $L = \{\epsilon\}$ is not an empty language as it +consists of one element i.e., an empty string. +- **Lexigographic order** + - Sometimes we may care about the order in which the elements of a + language are generated in. + - If there exists a total order *D* then we can use *D* to define on *L* + a useful total order called **lexicographic order** (written $<_L$): + $$ \forall x(\forall y((\ |x| < |y|\ )\to (x <_L y)))$$ + and of the strings of the same length, sort them in dictionary order using + *D*. + +### Cardinality of a language +- The smallest language over any alphabet is $\varnothing$ with cardinality of 0 +- The largest language over any alphabet $\Sigma$ is $\Sigma^\ast$ +- For $\Sigma = \varnothing,\ \Sigma^\ast = \{\epsilon\}$ and $|\Sigma^\ast|=1$ + theorem 2.2 is for non-empty alphabets. + +### Theorem 2.2 +If $\Sigma \neq \varnothing$ then $\Sigma^\ast$ is countably infinite +($\aleph_0$) +- Therefore, the cardinality of every language is at least 0 and at most +${\aleph_0}$ + +### How many languages are there? +- The set of languages defined on $\Sigma$ is $P(\Sigma^\ast)$ +- For $\Sigma = \varnothing,\ \Sigma^\ast = \{\epsilon\}$ and $P(\Sigma^\ast)\ +is\ \{\varnothing, {\epsilon}\}$ +- But when $\Sigma \neq \varnothing$ theorem 2.3 applies. + +### Theorem 2.3 +If $\Sigma \neq \varnothing$ then the set of languages over $\Sigma$ is +uncountably infinite. + +### Functions on a language +- Since languages are sets, all of the standard set operations are well-defined +on languages. (refer Ex2.12 from page 15) +- **concatenation**\ +Let $L_1$ and $L_2$ be two languages defined over $\Sigma$ then: +$$L_1L_2=\{w\in \Sigma^\ast : \exists s \in L_1(\exists t \in \L_2(w = st))\}$$\ +Example\ +Let $L_1 = \{\texttt{cat, dog, mouse}\}$ and $L_2 = \{\texttt{bone, food}\}$\ +\vspace{-0.2in} +\begin{multline}\notag +L_1L_2 = \{\texttt{catbone, catfood, dogbone, dogfood,}\\ +\texttt{mousebone, mousefood}\} +\end{multline} +\- The language {$\epsilon$} is the identity for concatenation of languages. +For all languages *L*: +$$L\{\epsilon\} = \{\epsilon\}L = L$$ +\- The language $\varnothing$ is a zero for concatenation of languages. +For all languages *L*: +$$L\varnothing = \varnothing L = \varnothing$$ +There are no ways of selecting a string from an empty set.\ +\- It's also associative +$$(L_1L_2) L_3 = L_1(L_2L_3)$$ +- **Kleene star**\ +Let *L* be a language defined over $\Sigma$ then: +\begin{multline}\notag + L^\ast = \{\epsilon\} \cup \{w \in \Sigma^\ast : \exists k \geq 1 + (\exists w_1, w_2,\dots w_k \in L\\ + (w = w_1w_2\dots w_k))\} +\end{multline} +note[^1]\ +Example:\ +\begin{equation}\notag +\begin{split} + \text{Let }L = & \{\texttt{dog, cat, fish}\}\text{. Then:}\\ + L^\ast = & \{\epsilon\texttt{, dog, cat, fish, dogdog, dogcat,\dots,}\\ + & \texttt{fishdog, fishcat, fishfish,\dots,}\\ + & \texttt{fishcatfish,fishdogfishcat,\dots} + \}\\[0.1in] +\end{split} +\end{equation} +\- $L^\ast$ always contains an **infinite number** of strings as long as *L* +is not $\varnothing$ or {$\epsilon$}. i.e., as long as there is one nonempty +string in *L*.\ +\- If *L* = $\varnothing$, then $L^\ast$ = {$\epsilon$} as there are no strings +that could be concatenated to $\epsilon$ to make it longer. This means that +the Kleene star of any language must have at least $\epsilon$ in it.\ +\- If $L=\{\epsilon\}$, then $L = \{\epsilon\}$ as well. + +[^1]: The part $\exists w_1, w_2,\dots w_k \in L$ should mean 'select *k* +elements from *L*'. Each time selecting *k* elements in a particular +permutation and concatenating them. + +- **reverse** +Reverse of a language *L* defined over $\Sigma$, written as $L^R$ is: +$$L^R = \{w \in \Sigma^\ast : w = x^R \text{ for some }x \in L \}$$ + + +### Theorem 2.4 +If $L_1$ and $L_2$ are languages, then $(L_1L_2)^R = L_2^RL_1^R$ + +### Assigning Meaning to Languages + +To be able to use the language and form the framework for it's applications +we need to assigning meaning to its strings. Working with formal languages +require a precise way to assign meaning to strings (also called its +**semantics**). +\- A function that maps strings to its meanings is called a **semantic +interpreation function**. But since languages are infinite, its not, in general +possible to map each string with its meaning.\ +\- Instead we define a function in such a way that it identifies units and can +combine those units based on rules to build meanings for larger expression. We +call such a function, **compositional semantic interpretation function**\ +\- So this function "composes" the meanings of simpler constituents into a +single meaning for a larger expression.\ +\- When we define a formal function to fulfill a specific purpose, we design +it so that there exists a compositional semantic interpretation function.\ +\- For example there exists a compositional semantic interpretation function +for the C programming language, a C compiler.\ +\- These functions are generally *not* one-to-one. For example:\ +\vspace{-0.2in} + +- "Chocolate, please", "I'd like chocolate", "I'll have chocolate" all mean the +same +- These also have to same meaning + ``` + int x = 4; int x = 4; int x = 4; + x++; x = x --1; x = x + 1; + ```
A
automata-rich/03_language_hierarchy.md
@@ -0,0 +1,108 @@
+--- +geometry: +- lmargin=0.9in +- rmargin=0.15in +- tmargin=0.2in +- bmargin=0.5in +- twoside +papersize: a4 +classoption: +- twocolumn +... + +# Language Recognition +- The unifying framework into which any computational problem can be cast +is language recognition. +- Given: + - The definition of language *L* + - A string *w*. + + we ask the question: "Is *w* in *L*?". This question is a part of a more + general class of prblem called the decision problem which requires a yes + or a no answer. + +# Notes +## The Framework +- The Languages and strings concept give us a mathematical model to work with +that can be used to solve computation problems of all sorts. +- The language recognition task is similar to the way of defining a set using +a *characteristic funtion* that decides whether an element is a part of the +set or not. +- "Is *w* in *L*?" is the decision that we have to take. That becomes our main +task. The Language will obviously have to be defined and all the strings have +to examined to make sure it's in *L*. + +## Encoding +- Now we have the fundamental question to ask, "Is *w* in *L*?" which might +seem limiting. So we need to figure out a way to "recast" a computational +problem, more complex into the form "Is *w* in *L*?" +- We use *encoding* for that. We express the objects as strings using an +encoding and resulting strings are a part of the language *L*. We can then +ask the question "Is *w* in *L*?" +- **Everything is a string**. Using strings as an abstraction is useful for +the mathematical model we are building. Dealing with strings is what is +crucial in theory of computation. And in fact the most basic and +fundamental units of computers are 0s and 1s which are essential the two +characters in the alphabet and every combination of them is a string. And +all of computing is formed by these strings of 0s and 1s. +- The encoding will obviously have to be specified for each problem. +For example A graph can be encoded as follows + - Start with the binary representation of the number of vertices $|V|$ + - List the edges in the graph as pairs of vertices represented by a pair of + binary numbers + - separate the binary numbers using '/' + +\begin{figure}[h] +\includegraphics[width=0.8in]{img/graph} +\centering +\end{figure} + + The above graph can then be represented as:\ + `101/1/10/10/11/1/100/10/101` + + Thus we have encoded a graph as a string. If $G$ was the graph then $<G>$ + represents the string encoding of the graph. + +- Encoding simply lets us express problems' entities as strings and we can +then define a language and ask the fundamental question "Is *w* in *L*?" +- For problems that are not decision problems we can reformulate them using +encoding to turn them into decision problems. The idea is to have the inputs +and the outputs of a problem *P* into a single string. This way we can have +a language constructed that has the correct outputs corresponding to the +correct inputs for that problem. +- When we have the decision question we can reduce it to the original problem. +This simply means that if we have a program that solves *P* we can use it +to construct a program that decides the language *L* for it. And if we have +the language *L* we can construct the program to solve *P* by checking if +the encoded problem string (inputs and outputs in a single string) for the +particular instance of the problem, is in *L* or not. + +## Machine-based hierarchy of language classes + +- Regular languages (FSM) +- Context-Free languages (PDA) +- Decidable and Semidecidable languages (Turing Machine) + +\begin{figure}[h] +\includegraphics[width=2in]{img/languages-hier} +\centering +\end{figure} + +- **Regular Languages** - languages that can be accepted by some FSM are +called regular languages. We can have an FSM for +$$L=\{w \in \{\texttt{a,b}\}^\ast: \text{all a's come before b's in } w\}$$ +- **Context-Free Languages** - languages that can be accepted by a PDA. A PDA +is a pushdown automata and is similar to an FSM but it also has a stack. +the notation *x/y/z* is used as a label for an arc to show that if *a* is read +then pop *y* from the stack if possible and push *z* to the stack if possible +and move to the pointed state. $x/\epsilon /z$ would mean "don't check the +stack but push *z* if *x* read". $x/y/\epsilon$ would mean pop *y* and don't +push anything if *x* read. We can build a PDA for: +$$ L = \{a^nb^n : n\geq 0\}$$ +- **Decidable Languages** - languages for which a Turing machine halts on +all inputs. It's guaranteed to give a 'yes' or a 'no'. One such example is: +$$ L = \{a^nb^nc^n : n\geq 0\}$$ +- **Semidecidable Languages** - languages for which a Turing machine is not +guaranteed to halt. It may accept a string in *L* but may not be able to +reject a string not in *L* i.e., it might not know when to stop looking +for an answer.
A
automata-rich/05_finite_state_machines.md
@@ -0,0 +1,60 @@
+--- +geometry: +- lmargin=0.9in +- rmargin=0.05in +- tmargin=0.2in +- bmargin=0.5in +- twoside +papersize: a4 +classoption: +- twocolumn +... + +## Formal Notations of FSM +- FSM (DFSM) is a quintuple $(K, \Sigma, \delta, s, A)$\ + where:\ + - *K* is a finite set of states + - $\Sigma$ is the input alphabet + - $s \in K$ is that start state + - $A \subset K$ is thet set of accepting states + - $\delta$ is the transition function that maps from $$K \times \Sigma + \text{ to } \Sigma$$ + +- A **configuration** of DFSM is an element of $K \times \Sigma^\ast$. + Think of it as a snapshot of $M$ at any given point. A configuration gives + us two sets of information:\ + - The current state. + - The input that is still left to read.\ + Example - $(q_0, \texttt{abbabab})$, $(q_1, \texttt{bbabab})$, + $(q_2, \texttt{babab})$ ... + +- The **initial configuration** of DFSM is $(s_M, w)$ where $s_M$ is the start + state of *M* and *w* is the string to be read. + +- The **transition function** $\delta$ defines the operation of a DFSM *M* + one step at a time. Relation **yeilds-in-one-step** is written $|-_M$ + $\text{}_\text{}$. *Yeilds-in-one-step* relates $\text{configuration}_1$ to + $\text{configuration}_2$ iff $\text{configuration}_1$ leads to + $\text{configuration}_2$ in one step. + $$(q_1, cw) |-_M (q_2, w) \text{ iff }((q1,c),q_2)\in\delta$$ + +- to be continued... + + + +## Designing Deterministic Finite State Machines + +- We need to think of what properties of the part of *w* that has been read so + far has an effect on *M*. Those are the properties that *M* has to record +- Strings must "cluster" which means that multiple different strings drive M to + the same state. They have the same property which makes them go to that + state. **The smallest DFSM of any language is the one that has exactly one + state for every group of initial substrings that share that common property** +- Complement of a language - "A language that doesn't have a specific + substring, we can first design the FSM such that it accepts strings with that + substring and then just swap the accepting and rejecting states. + + +## Nondeterministic FSMs + +-
A
automata-rich/header
@@ -0,0 +1,3 @@
+\usepackage{graphicx, xcolor} +\usepackage{pstricks} +\usepackage{import}
A
automata-rich/img/src/graph.svg
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="53.650692mm" + height="31.142756mm" + viewBox="0 0 53.650692 31.142756" + version="1.1" + id="svg8" + inkscape:version="0.92.4 5da689c313, 2019-01-14" + sodipodi:docname="graph.svg"> + <defs + id="defs2" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.959798" + inkscape:cx="150.28891" + inkscape:cy="8.76986" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1366" + inkscape:window-height="748" + inkscape:window-x="0" + inkscape:window-y="20" + inkscape:window-maximized="0" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-25.349687,-132.4992)"> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:serif;-inkscape-font-specification:serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="24.316158" + y="138.85799" + id="text12"><tspan + sodipodi:role="line" + id="tspan10" + x="24.316158" + y="138.85799" + style="font-size:8.46666622px;stroke-width:0.26458332">1</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:serif;-inkscape-font-specification:serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="48.851402" + y="138.85799" + id="text12-9"><tspan + sodipodi:role="line" + id="tspan10-1" + x="48.851402" + y="138.85799" + style="font-size:8.46666622px;stroke-width:0.26458332">2</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:serif;-inkscape-font-specification:serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="74.242012" + y="138.78305" + id="text12-2"><tspan + sodipodi:role="line" + id="tspan10-7" + x="74.242012" + y="138.78305" + style="font-size:8.46666622px;stroke-width:0.26458332">3</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:serif;-inkscape-font-specification:serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="42.436935" + y="163.64195" + id="text12-0"><tspan + sodipodi:role="line" + id="tspan10-9" + x="42.436935" + y="163.64195" + style="font-size:8.46666622px;stroke-width:0.26458332">4</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.46666622px;line-height:1.25;font-family:serif;-inkscape-font-specification:serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="67.560272" + y="163.49725" + id="text12-3"><tspan + sodipodi:role="line" + id="tspan10-6" + x="67.560272" + y="163.49725" + style="font-size:8.46666622px;stroke-width:0.26458332">5</tspan></text> + <path + style="opacity:1;fill:none;stroke:#000000;stroke-width:0.76499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 30.735995,143.32002 10.156242,12.2944" + id="path92" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.76499999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 55.592062,143.32002 10.156242,12.2944" + id="path92-0" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.75599998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 32.072344,136.23738 H 45.70309" + id="path966" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:0.75599998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="M 57.585839,136.23738 H 71.216585" + id="path966-6" + inkscape:connector-curvature="0" /> + </g> +</svg>
A
automata-rich/img/src/languages-hier.svg
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="169.96533mm" + height="169.96533mm" + viewBox="0 0 169.96533 169.96533" + version="1.1" + id="svg8" + inkscape:version="0.92.4 5da689c313, 2019-01-14" + sodipodi:docname="languages-hier.svg"> + <defs + id="defs2" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.98994949" + inkscape:cx="523.31968" + inkscape:cy="470.59698" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="672" + inkscape:window-height="736" + inkscape:window-x="6" + inkscape:window-y="26" + inkscape:window-maximized="0" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" /> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-21.228643,-83.883406)"> + <circle + style="opacity:1;fill:none;stroke:#000000;stroke-width:0.74655527;stroke-miterlimit:4;stroke-dasharray:none" + id="path836" + cx="106.21131" + cy="168.86607" + r="84.60939" /> + <circle + style="opacity:1;fill:none;stroke:#000000;stroke-width:0.667;stroke-miterlimit:4;stroke-dasharray:none" + id="path836-5" + cx="106.21131" + cy="168.86607" + r="64.28833" /> + <circle + style="opacity:1;fill:none;stroke:#000000;stroke-width:0.60299999;stroke-miterlimit:4;stroke-dasharray:none" + id="path836-5-3" + cx="106.21131" + cy="168.86607" + r="45.66069" /> + <circle + style="opacity:1;fill:none;stroke:#000000;stroke-width:0.51788515;stroke-miterlimit:4;stroke-dasharray:none" + id="path836-5-3-5" + cx="106.21131" + cy="168.86607" + r="21.473536" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33862591px;line-height:1.25;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.23346563" + x="80.235863" + y="98.062958" + id="text915"><tspan + sodipodi:role="line" + id="tspan913" + x="80.235863" + y="98.062958" + style="stroke-width:0.23346563">SD languages</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:9.33862591px;line-height:1.25;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.23346563" + x="81.309799" + y="117.52344" + id="text915-6"><tspan + sodipodi:role="line" + id="tspan913-2" + x="81.309799" + y="117.52344" + style="stroke-width:0.23346563">D Languages</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.59920597px;line-height:1.25;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.21498016" + x="107.68272" + y="134.12975" + id="text937"><tspan + sodipodi:role="line" + id="tspan935" + x="107.68272" + y="134.12975" + style="text-align:center;text-anchor:middle;stroke-width:0.21498016">Context-free</tspan><tspan + sodipodi:role="line" + x="107.68272" + y="144.87875" + style="text-align:center;text-anchor:middle;stroke-width:0.21498016" + id="tspan939">Language</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:8.59920597px;line-height:1.25;font-family:'Latin Modern Roman';-inkscape-font-specification:'Latin Modern Roman, ';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.21498016" + x="107.80311" + y="158.45552" + id="text937-9"><tspan + sodipodi:role="line" + x="107.80311" + y="158.45552" + style="text-align:center;text-anchor:middle;stroke-width:0.21498016" + id="tspan939-2">Regular</tspan><tspan + sodipodi:role="line" + x="107.80311" + y="169.20453" + style="text-align:center;text-anchor:middle;stroke-width:0.21498016" + id="tspan964">Languages</tspan></text> + </g> +</svg>
A
automata-rich/test.md
@@ -0,0 +1,16 @@
+--- +geometry: +- lmargin=0.9in +- rmargin=0.1in +- tmargin=0.2in +- bmargin=0.5in +- twoside +papersize: a4 +classoption: +- twocolumn +... + +\begin{figure}[h] +\includegraphics[width=0.8in]{img/graph} +\centering +\end{figure}
A
data-comm-beh/06_bandwidth_utilization.md
@@ -0,0 +1,263 @@
+# Multiplexing + +- Set of techniques that allow the simultaneous transmission of multiple +signals across a single data link. +- several low-bandwidth signals are multiplexed and sent across using a +high-bandwidth *link* + +![multiplexing](img/6.1.png){ width=45% }\ + +The word **link** refers to the physical path. **channel** refers to the +portion of the link that carries the transmission between the giver pair +of lines. + +## Frequency Division Multiplexing + +- This technique can be used when the bandwidth of the link (in Hz) is greater +than the combined bandwidths of the signals to be transmitted. +In other words -- the link's bandwidth can accommodate all the input lines + +- The carrier frequencies(input lines) are separated with sufficient +bandwidth to accommodate the modulated signal. These bandwidth ranges are +called channels + +- Channels are separated with strips of unused bandwidth -- **guard bands** -- +to prevent overlapping. + +- **Implementation**\ +For radios and wireless broadcasting, multiplexing is achieved if all the +parties decide to use different carrier frequencies\ +In other cases such as cellular networks, a base station assigns the carrier +frequencies + +![FDM](img/6.3.png){ width=45% }\ + +### Multiplexing Process +- Each source if of the similar frequency ranges, therefore they are modulated +to higher frequencies (carrier frequencies - $f_1, f_2\ and\ f_3$) + +![multiplexing process](img/6.4.png){ height=18%} + +### Demultiplexing Process +- Demultiplexer uses a series of filters to separate the multiplexed signal +into it's component signals +- They are passed through demodulators that result in the original signals + +![demultiplexing process](img/6.5.png){ height=18% } + +### The Analog Carrier System +- Telephone companies multiplex lower bandwidth lines to higher bandwidth lines +to form hierarchical as it is efficient to do so + +![Analog hierarchy](img/6.9.png){ height=20% } + + +## Wavelength-Division Multiplexing +- Technique to combine optical signals +- Conceptually the same as FDM, except that the signals involved are optical +signals transmitted through fiber-optic channels. +- Prism is used to split and combine light sources + + +## Time-Division Multiplexing +- A **digital** multiplexing process where several low-rate channels are +combined into one high-rate one +- Instead of portion of bandwidth, time shared. Each connection(input lines) +occupy some time in the link. +- Digital data from different sources are combined into one timeshared link. + +### Synchronous TDM +- Each input connection has an allotment in the output even if it's not sending +any data +- **Time Slots and Frames** + * input is divided into units(char, bit, byte, etc.) and occupies input time + slot + * every input unit becomes one output unit and occupies one output time slot, + but the duration output time slot is *n* times shorter than the duration of + the input slot + * if input time slot is $T$ s then output time slot is $T/n$ s + * *n* is the number of connections + * rate of the output link must be *n* times faster than input link + * A *frame* consists of one complete cycle of the input slots + * with *n* input lines there are *n* slots in each *frame* +- **Example 6.6**\ +![](img/6.14.png){ width=55% } + 1. The input duration is the inverse of the bit rate: $1/1$ Mbps = 1$\mu$s + 2. The output bit duration is $1/4$ $\mu$s + 3. The output bit rate is inverse of the output bit duration or $1/4$ $\mu$ + s or 4 Mbps. + 4. The frame rate is always the same as any input rate: 1,000,000 frames + per second. + 5. Also, the duration of the frame is the same as one input unit. + +- **Interleaving** + * It can be visualized as two fas-rotating switches on both sides + * As a switch opens on the muxing side, the connection as an opportunity to + send its unit + * On the de-muxing side, the connection has the opportunity to receive a + unit + + ![](img/6.15.png){ width=60% } + +- **Empty Slots**\ + Not as efficient. If a connection does not have data to send, then the + slots are sent empty. + +- **Data Rate Management** + * Multilevel Multiplexing\ +![](img/6.19.png){ width=45% } + * Multiple-Slot Allocation\ +![](img/6.20.png){ width=55% } + * Pulse Stuffing\ + When the connection is not a multiple of others\ + The highest data rate is made dominant and dummy bits are added to the input + lines with low rates. +![](img/6.21.png){ width=45% } + +- **Frame Synchronizing** + * Some bits are added to each frame so that the demultiplexer can synchronize +with the incoming stream. + * 1 bit per frame, altering between 0 and 1\ +![](img/6.22.png){ width=50% } + +- **Digital Signal Service (DS)** + * Telephone implement TDM in hierarchical manner + * Just like Analog hierarchy, many channels are multiplexed + * Every level multiplexes and also adds an overhead (for synchronization + bits)\ + ![](img/6.23.png){ width=70% }\ + **DS-0** is a single channel of 64kbps\ + **DS-1** capacity of 1.544Mbps -- $24 \times 64$kbps $+\ 8$kbps(overhead)\ + **DS-2** capacity of 6.312Mbps -- $96 \times 64$kbps $+\ 168$kbps + (overhead)\ + **DS-3** capacity of 44.376Mbps -- $672 \times 64$kbps $+\ 1.368$Mbps + (overhead)\ + **DS-4** capacity of 274.1766Mbps -- $4032 \times 64$kbps $+\ 16.128$Mbps + (overhead)\ + * Each of these services can be used as a single service or can be used + to multiplex other services + +- **T-Lines** + * To implement to the services phone companies use T-lines with the capacity + matching the data rates of DS1-DS4 services. There are commercially + available. + + Service Line Rate(Mbps) Voice Channels + ------- ----- ------------- --------------- + DS-1 T-1 1.544 24 + DS-2 T-2 6.312 96 + DS-3 T-3 44.736 672 + DS-4 T-4 274.176 4032 + + + +- **T Lines for Analog Transmission** + * 24 voice channels can be transmitted through one T-1 Line + * These are called voice channels as they have a capacity that can carry + 24 voice channels in digital form assuming 4kHz analog voice signals are + PCM'd with 8000 samples/s using 8bit per sample. 1 digital voice channel then + becomes 64kbps\ + ![](img/6.24.png){ width=70% }\ + +- **T-1 Frame** + * 1 T-1 Frame = 193 bits ( 24 slots of 8 bit each + 1 sync bit ) + * each slot is a signal sample from each channel\ + ![](img/6.25.png){ width=70% }\ + + +### Statistical TDM +\- Here the slot are dynamically allocated as they arrive\ +\- Only if an input line has a slot's worth of data to send, it is given a +slot in the output frame\ +\- Improves efficiency as no bandwidth is wasted\ +\- The multiplexer checks the inputs in a **round-robin** fashion\ +\- Synchronization bit is **not** required here\ +\- The capacity of the link (output) is normally < the sum of the +capacities of each input channel. + +- **Addressing** + * In Synchronous TDM there is no fixed predefined relationship between the inputs and + the outputs and there is not reservation of slots. + * In TDM, there was no need of addressing as the synchronization itself + served as an addressing mechanism + * Here however, we need addressing to ensure each slot reaches it's + output connection. + * Simplest form of addressing -- *n* bit addressing for *N* lines where + $n=\log_2 N$ + * Eight lines = 3 bit address.\ + ![](img/6.26.png){ width=65% }\ + +- **Slot Size** + * ratio of data size to address size must be reasonable to make transmission + efficient. 1 bit per slot with 3 bit addressing is $300\%$ overhead + * The block data is usually many bytes and the address is just a few bytes. + + + +# Spread Spectrum + +\- We combine signals from different sources but for reasons different than +bandwidth efficiency\ +\- **Used in wireless communications** where other concerns outweigh bandwidth efficiency -- Such as eavesdroppers and signal jammers. Stations must be able +share the air medium without these problems.\ +\- If required bandwidth for a station is *B*, spread spectrum expands it to +$B_{SS}$, such that $B_{SS} >> B$.\ +\- This expanded bandwidth acts as an envelope to secure the station's +message.\ +\- 2 principles are followed: + + 1. The allocated bandwidth to each station must be, by far, larger than what + is needed. This allows redundancy. + 2. The spreading process must take place independent of the original signal, + ie. the spreading process occurs after the signal is created from the + source.\ + ![](img/6.27.png){ width=50% }\ + The spreading code looks like a series of random numbers but they have a + pattern + +## Frequency Hopping Spread Spectrum (FHSS) +\- This technique uses *M* different carrier frequencies that are modulated by +the source signal.\ +\- At one moment, the signal modulates one carrier frequency; at the next +moment, it modules another carrier frequency.\ + +(Refer Figures) + +- A *pseudorandom noise (PN)*, creates k-bit pattern for every *hopping +period* $T_h$ +- The pattern maps to a frequency on the *frequency table* to be used for this +hopping period and passes it on to the *frequency synthesizer* +- If $M=8$ then $k=3$ and 8 different 3-bit patterns are created. These +patterns are repeated after every 8 hops in the same order (Note: This +example is non-practical; *M* is much larger in real) +- If *M* is large and $T_h$ is short, the sender and receiver can have privacy. +It also has an anti-jamming effect. + + +![](img/6.28.png){ width=55% } +![](img/6.29.png){ width=45% } + + + +**Bandwidth Sharing**\ +\- We can multiplex the *M* frequencies together into the same $B_{SS}$ +bandwidth. This is possible as a station uses only one frequency in each hopping period\ +\- FHSS Similar to FDM -- In FDM each station uses *1/M* of the bandwidth, but +allocation is fixed; FHSS, each station uses *1/M* but of the bandwidth, but +the allocation changes hop to hop.\ +![](img/6.30.png){ width=55% } + +| << fig 6.32 >> + + +## Direct Sequencing Spread Spectrum +\- We replace each bit with *n* bits called the chips. The chip rate is *n* +times that of the data bit.\ +\- Original data is multiplied by the chips to get the *spread signal*\ +\- Eg: Barker Sequence -- $n=11$; If data rate = *N* then spread signal is +$11 \times N$ and even bandwidth required is 11 times larger than the original +signal\ +\- If the spread signal cannot be combined and separated then bandwidth +sharing is not possible. A special code is required to achieve bandwidth +sharing\ +![](img/6.33.png){ width=75% }
A
data-comm-beh/08_switching.md
@@ -0,0 +1,180 @@
+# Switching +- Using hardwired point-to-point mesh topology and star topology is inefficient for large networks +and hence we use switching +- Switched network consists of nodes, called switches. Switches are devices +capable of creating a temporary connection between two or more devices that +are linked to it.\ +![](img/8.2.png){width=60%} + +- *Switching and TCP/IP Layers :* + * Switching at Physical Layer -- Only circuit switching. Switches physically + allow signals to travel in one path or the other + * Switching at Data-Link Layer -- Packet Switching. (virtual-circuit) + Packet refers to frames or cells. + * Switching at Network Layer -- Packet Switching. (virtual-circuit or Datagram) + * Switching at Application Layer -- Message switching (No solid example) + +## Circuit-Switched Networks +- Consists of switches connected by physical links. Every connection +uses one dedicated channel on each link +- Connection between two stations is a dedicated path made of one or more +links.\ + ![](img/8.3.png){width=70%} + * A sends a request to M, that must be accepted by all switches and also + M (Setup Phase) + * A circuit (channels) is reserved in each link, and the combination of + the channels and links make the dedicated path + * Data is transferred (data transfer phase) and then the circuits are torn + down +- Before communication the stations **must make reservation of the resources** +(channels bandwidth in FDM and time slots in TDM), switch buffers switch ports, processing +time, and **must remain dedicated during the entire duration of data transfer**. +- The data are a continuous flow sent by the source station and received by the +destination station. There may be period of silence. +- There is not addressing involved, It's all physical. Though during setup +phase addressing is used. +- Before *A* and *M* can start talking, a dedicated circuit needs to be setup + that is a combination of channels and links. +- *A* first sends a setup request which includes the address of *M* to Switch I. +- Switch I finds a channel between itself and Switch IV, which then finds +a channel between itself and Switch III. M then sends an acknowledgment in +opposite direction to system A. +- The addresses are assigned by the network admin. +- **Efficiency** + * The resources are only available to one connection at any given time + * **Delay** is minimal. During data transfer, data in not delayed at a given +switch\ + ![](img/8.6.png){width=70%} + +## Packet Switching +\- Message is divided into packets; size decided by the network and protocol\ +- There is **no resources allocation** for a packet, no reserved bandwidth +or processing time for each packet.\ +- **Resources allocated on demand** and on first-come, first-served basis.\ +- There is a waiting time for each packet if there are other packets being +processed + +### Datagram Networks +- Each packet is treated equally and independently of others, even if it +belongs to the same transmission. +- Switches are traditionally referred to as *routers*\ + ![](img/8.7.png){width=85%} + * Four datagrams belong to the same message, but may travel different paths + to reach destination because links might be busy carrying packets from + other sources and bandwidth is not available. + * So packets arriving in wrong order is possible. It's the responsibility + of the upper layer protocol to reorder the datagrams and ask for lost ones. +- They are also referred to as *connectionless networks* as the switch does + not keep any information of the connection state of the packet (As there is + no setup processes) +- **Routing Table** -- A routing table is present in each switch which is + based on the destination address. The table gives the information to the + switch where to send it's packet depending on the destination address. +- **Destination Address** -- Every packet has a head containing the + destination address of the packet. The destination address remains the same + through out the journey of the packet. +- **Efficiency** -- Better than circuit-switched; resources allocated only + when packets are to be sent. +- **Delay** -- Packets might have to wait as the switch might be busy + processing other packets. Delay may be greater than virtual-circuit network. + Also the delay is not uniform due to which packet of the same message may + arrive at different times. + +![Routing table in a datagram network](img/8.8.png){height=20%} + +![Delay in datagram network](img/8.9.png){height=22%} + + +### Virtual-Circuit Networks +Unlike physical circuit switched networks, virtual circuits are setup using +table entries. During the setup phase these "circuits" are setup and an +entry in each router is created for that connection. + +1. Cross between circuit-switched and datagram network +1. Setup and teardown process present +1. Resource can be allocated during setup phase, or on demand +1. Packets carry headers, but the address has local jurisdiction +1. All packets follow the same path established during the connection + +- **Addressing** + * *Global Address* -- An address that is unique to each device in the whole + network. Used to make the table entries for each connection during the setup phase. + * *Virtual-Circuit Identifier* -- Has a switch scope; VCI changes after it + passes through each switch.\ + ![](img/8.11.png){width=55%} + +- **Data Transfer Phase** (refer fig. 3) + * The data arrives in packets and each packet have a VCI number. + * The VCI number helps each router to send the packet to the next router + * Each router changes the VCI number in the packet as it arrives, and sends + it through the assigned output *port* + + + + + +![Switches & tables during data transfer phase](img/8.12.png){width=70%} + +- **Setup Phase** + * This is when the entries in the tables are made for a virtual-circuit for + a connection. + * There are two steps in this process -- *Setup Request* and + *Acknowledgement* +- *Setup Request* + + ![](img/8.14.png){width=76%} + 1. Source *A* sends the setup frame to switch 1 + 2. Switch 1 knows that a frame from A to B goes through port 3. The switch + creates an entry in it's table but only fills 3 columns. Assigns the + incoming port, VCI and outgoing port. + 3. The setup request frame goes to the switch 2 and 3 and the same thing + happens + 4. Finally frame reaches the destination and if it is ready receive frames + from A, it assigns a VCI to the frames coming from A. This way it knows + that a frame with VCI 77 (in the eg) comes from A. +- *Acknowledgement* + 1. Destination sends the acknowledgement frame to switch 3. This frame + also carries the global source so that the switches know which entry in the table + has to be completed. + 2. Switch 3 assigns the VCI 77 as the outgoing VCI in the entry and sends + the frame off to switch 2 according to the port number in the VCI in its + table entry and changes the VCI to 22 in the header + 3. The frame is then sent to Switch 2 and the same thing happens. + 4. The frame finally gets transferred to the source with the VCI that was + chosen by switch 1 in the setup request step. + 5. This VCI is then used by A to send data to B + + ![](img/8.15.png){width=80%} + +- **Teardown Phase** + * After A is done sending it's data to B, it sends a special frame called the + *teardown request*. When B responds to the teardown request frame, all + switches delete the entry for that connection/virtual-circuit from their + tables. +- **Efficiency** + * Resources can be allocated during the setup process or can be on demand + during data transfer. + * In the first case, there is no delay but in the second case, there may be + some delay + + <!--end of list --> +***In Virtual Circuit Switching, all packets belonging to the same source + destination travel the same path (as the switching tables are setup), but the packets my arrive at the destination with different delays if the resource allocation is on demand.*** + +- **Delay** + * There is one time delay during the setup and the teardown process, there + also may be extra delay if resource allocation is on demand. + + ![](img/8.16.png){width=70%} + + +## Additional Notes +- As the name suggests, ***Virtual***-Circuit Network, the circuit that is setup +using the tables in each switch is *Virtual* unlike the physical circuit setup +by the switches in circuit switch network. It's virtual in the sense +as there are address that define that path of the circuit from one switch to +the other but the circuit doesn't actually exist. Transfer of packets from one +switch to other makes it look like there is a path. +- There are two different tables in the Virtual-Circuit Network Switch. One +is the Switching table, that is setup for each connection and the other is +the Routing table that is setup according to the Global addresses.
A
data-comm-beh/tcp_ip_layers_table.md
@@ -0,0 +1,30 @@
+:TCP/IP Layers + ++---------------+-----------------+------------------------+-----------------------------------+ +| Layer | Object | Protocols/Techniques | Address Type | ++===============+=================+========================+===================================+ +| Application | Message | HTTP,SSH,FTP,TELNET, | Names - exmaple.com | +| | | ... | | ++---------------+-----------------+------------------------+-----------------------------------+ +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| Transport | User Datagrams/ | UDP, TCP, SCTP, ... | Port - :8000 | +| | Segments | | | +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| Network | Datagrams | IP, ICMP, IGMP, ... | Logical Address - 192.168.1.2 | +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| Data Link | Frame | Ethernet, PPP, ALOHA, | Link layer address/Mac address/ | +| | | ARP, ... | Physical address | +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| | | | | ++---------------+-----------------+------------------------+-----------------------------------+ +| Physical | bit | Manchester Encoding, | N/A | +| | | QAM, FHSS ... | | ++---------------+-----------------+------------------------+-----------------------------------+
A
java-schildt/07_a_closer_look_at_methods_and_classes.md
@@ -0,0 +1,154 @@
+--- +geometry: +- lmargin=0.9in +- rmargin=0.5in +- tmargin=0.3in +- bmargin=0.5in +- twoside +papersize: a4 +classoption: +... + +## Understanding Static +- When a member is declared static, it can be accessed before any objects of +its class are created, and without reference to any abject. +- They are essentially global variables. +- When objects of it's class are declared, no copy of the static variable is +made. Instead, **all instances of the class share the same static variable**. +- It's a way to used global variables and methods. One example could be +a static variable to store the API key for an application that consumes some +REST API +- Methods declared as static have restrictions on them: + * They can only call other static methods (memebers of the same class). + * They must only access static data (members of the same class). + * They cannot refer to `this` or `super` in any way. +- If computation is required in order to initialize static variables, it can +be done in a `static` block. This block gets executed exactly once, when the +class is first loaded +``` +//demonstrate static variables, methods and blocks. +class UseStatic { + static int a = 3; + static int b; + + static void meth(int x){ + System.out.println("x = " + x); + System.out.println("a = " + a); + System.out.println("b = " + b); + } + + static { + System.out.println("Static block"); + b = a * 4; + } + + public staic void main(String args[]) { + meth(42); + } +} +``` +- As soon as UseStatic is loaded, all the static statements are run. + +Output: + +``` +Static block +x = 42 +a = 3 +b = 12 +``` +- Outside of the class in which they are define, static methods and variables +can be used by use of the *dot operator* +- Eg: *`ClassName.mehtod`*`()`, *`ClassName.variable`*`()` + +## Introducing Nested & Inner Classes +- A nested class has acces to the members, including *private* members, of the +class in which it is nested. +- The enclosing class does not have access to the members of the nested class +- **2 Types of nested classes** + * *Static* - It cannot refer to members of the enclosing class directly. It + must access the members of the enclosing class through an + object, as it is `static` + * *Non-Static* - An inner class is a non-static nested class. It can refer + to the members of the outer class directly just like how other non-static + members do. + + + + + +### Example: Demonstrate an inner class + +``` +class Outer { + int outer_x = 100; + + void test() { + Inner inner = new Inner(); + inner.display(); + } + + class Inner { + void display() { + System.out.println("display: outer_x = " + outer_x); + } + } +} + +class InnerClassDemeo { + public static void main(String args[]) { + Outer outer = new Outer(); + outer.test(); + // main -> Outer.test -> Inner.display -> outer_x(direct access) + } +} +``` + +*Output:* +``` +display: outer_x = 100 +``` + + +- Instance of `Inner` can only by created within the scope of `Outer` +- However to create an instance of `Inner` outside of the scope of `Outer`, +full name can be qualified with `Outer.Inner`. +- Members of the inner class are known only to the inner class and cannot be +used by the outer class +- *Also, It is possible to define an inner class within any block scope* + +### Example: Define an inner class within a for loop +``` +class Outer { + int outer_x = 100; + + void test() { + for(int i=0; i<5; i++) { + class Inner{ + void display() { + System.out.println("Display: outer_x = " + outer_x); + } + } + Inner inner = new Inner (); + inner.display(); + } + } +} + +class InnerClassDemo { + public static void main(String args[]) { + Outer outer = new Outer(); + outer.test(); + } +} + + +``` +*Output:* +``` +display: outer_x = 100 +display: outer_x = 100 +display: outer_x = 100 +display: outer_x = 100 +display: outer_x = 100 +```
A
java-schildt/08_inheritance.md
@@ -0,0 +1,12 @@
+# Chapter 8 -- Inheritance + +## Points to remember +- Member access - a subclass inclues all of the superclass members, but it +cannot access those memebers of the superclass that are declared as `private` +- A major advantage of inheritance is that you can define a class with all +the common attributes, and then extend that class and add more specific +attributes required +- A reference variable of a superclass cab be assigned a reference to any +subclass derived from that superclass + +### Example:
A
java-schildt/09_packages_and_interfaces.md
@@ -0,0 +1,152 @@
+# Chapter 9 -- Packages & Interfaces + +## Packages +- It is a mechanism provided by java to manage namespaces. +- It is both a naming and visibility control mechanism. +- Java uses filesystem directories to store packages. Therefore declaring a +package as: + + ``` + package MyPackage; + ``` + should also reflect in the filesystem with the **same name and case** +- Another example: + + ``` + package org.prithu.image; + ``` + needs to be stored in `org/prithu/image` + + +## Finding Packages and `CLASSPATH` +- By default, java runtime system uses the current working directory as its +starting point to search for packages +- Second, `CLASSPATH` environmental variable can point to directories +- Third, using `-classpath` option with `java` and `javac` + +I order for a program to find **`MyPack`** one of the things must be true: + +1. Program is executed in a directory immediately above **`MyPack`** +2. `CLASSPATH` must be set to include the path to **`MyPack`** +3. `-classpath` option must specify the path to **`MyPack`** + +while using 2. and 3. the *path to* **`MyPack`** must be specified and not +**`MyPack`** itself.\ + +## Access Protection +- Classes and packages are both means of encapsulating and containing the +namespace and scope of variable and methods. Packages act as containers for +classes and other subordinate packages. + + +: Class Member Access + ++-------------------+---------+-------------+-----------+---------+ +| | Private | No Modifier | Protected | Public | ++===================+=========+=============+===========+=========+ +| Same class \ | **Yes** | **Yes** | **Yes** | **Yes** | +| | | | | | ++-------------------+---------+-------------+-----------+---------+ +| Same package\ | No | **Yes** | **Yes** | **Yes** | +| subclass | | | | | +| | | | | | ++-------------------+---------+-------------+-----------+---------+ +| Same package\ | No | **Yes** | **Yes** | **Yes** | +| non-subclass | | | | | +| | | | | | ++-------------------+---------+-------------+-----------+---------+ +| Different package\| No | No | **Yes** | **Yes** | +| subclass | | | | | +| | | | | | ++-------------------+---------+-------------+-----------+---------+ +| Different package\| No | No | No | **Yes** | +| non-subclass | | | | | +| | | | | | ++-------------------+---------+-------------+-----------+---------+ + +- When a class is declared `public` it must be the only class declared in the +file +- If a class is `public` it can be accessed by any code but if it has +default +access, then it can only be accessed only from within its same package + +## Importing Packages +- The import statement brings certain classes, or entire packages, into +visibility and then a class can be referred directly by name. (instead of using +the fully-qualified name) +- `import` statements occur immediately following the package statement + ``` + import pkg[.pkg2].(classname | *); + ``` +- The star form may increase **compilation time**---especially if you +import +several large packages. It's a good practice to only import the classes +you +need. Although the star form has no effect on run-time performance. +- The `java.lang` package is automatically imported during compilation +- When a package is imported (using `*`) only **public** classes will be +available to **non-subclasses** in the importing code +- `import` is a convenience, but, any where a class name is used, you can use +it's *fully qualified name*. + +**With `import`** +``` +import java.util.*; +class MyDate extends Date{ +} +``` +**Without `import`** +``` +class Mydate extends java.util.Date{ +} +``` + +## Interfaces +- Complete abstraction possible using Interfaces. Specifies what a +class must do, but not how it does it. +- Similar to classes but they lack instance variables, and the methods have +not body +- A class that implements the interface must define all the methods from the +interface. +- They disconnect the definition of the method from the class hierarchy, ie. +A class must not depend on inheritance to gain some functionality. +- Here it is possible for classes to implement an interface that is unrelated +to it's class hierarchy. Thus it avoids the problem where more functionality +is added to the superclass. +- variables declared inside must be initialized and are implicitly declared +`final` and `static` +- If a class implements two interfaces that declare the same method, then +the same method will be used by clients of either interface. +- The methods that implement an interface must be declared **public** +- A variable to reference objects implementing an interface can be made using +the name of the interface. When a method is called using this reference +variable, the version of the method called depends on the object being +referred to just like DMD. +- Although, the Interface type variable knows only about it's methods and +cannot access any other member of the implementing class +- A class partially implementing an Interface must be declared abstract. + +*Dynamic lookup of a method is a significant overhead +when compared to normal method invocation, you should +be careful not to use interfaces casually in +performance-critical systems* + +### Example: + +``` +interface Callback { + void callback(int param); +} + +class Client implements Callback { + public void callback(int p){ + System.out.println("Client: callback called with" + p); + } + + +class AnotherClient implements Callback { + public void callback(int p) { + System.out.println("AnotherClient: p squared" + (p*p)); + } +} +```
A
java-schildt/22_event_handling.md
@@ -0,0 +1,3 @@
+# Chapter 22 -- Event Handling + +## The Delegation Event Model
A
misc/cheat.md
@@ -0,0 +1,71 @@
+# Multiplexing + +- Set of techniques that allow the simultaneous transmission of multiple +signals across a single data link. +- several low-bandwidth signals are multiplexed and sent across using a +high-bandwidth *link* refer to [code] + + +![mux](img/6.1.png){ width=80% } + + +a formula, ${e}^{i\pi }+1=0$, nside a paragraph. +a formula, $$\forall x \in X$$, nside a paragraph. + +| The limerick packs laughs anatomical +| In space that is quite economical. +| But the good ones I've seen +| So seldom are clean +| And the clean ones so seldom are comical + + + +Term 1 + +: Definition 1 + +Term 2 with *inline markup* + +: Definition 2 + + { some code, part of Definition 2 } + + Third paragraph of definition 2. + + +: Sample grid table. + ++---------------+---------------+--------------------+ +| Fruit | Price | Advantages | ++===============+===============+====================+ +| Bananas | $1.34 | - built-in wrapper | +| | | - bright color | ++---------------+---------------+--------------------+ +| Oranges | $2.10 | - cures scurvy | +| | | - tasty | ++---------------+---------------+--------------------+ + + +``` {#code .c .numberLines} +minclude <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "hashtable.h" + +/* --------------------- */ +/* Linked List Functions */ +/* --------------------- */ + +void * +HashTableGet(char *key, HashTable *hashtable){ + unsigned long hash = hash_function(key, hashtable->capacity); + List *list = hashtable->lists[hash]; + if (ListIsEmpty(list)) + return NULL; + + else{// if only one element in the list + elem_t *elem = ListGetItem(0, list); + return elem->value; + } +} +```
A
misc/latex.notes.md
@@ -0,0 +1,26 @@
+## Formating + +Command Declaration version Meaning +-------- --------------------- -------- +`\textrm{}` `\rmfamily` roman family +`\textsf{}` `\sffamily` +`\texttt{}` `\ttfamily` +`\textbf{}` `\bfseries` +`\textmd{}` `\mdseries` +`\textit{}` `\itshape` +`\textsl{}` `\slshape` +`\textsc{}` `\scshape` +`\textup{}` `\upshape` +`\textnormal{}` `\normalfont` + +- `\noindent` suppresses the paragraph indentation +- Instead of using **groups** (`{...}`) that define a scope, we can use the +environment version of it eg. `\huge` declaration has the `\begin{huge}` +environment\ + Using environments can make the source more readable +- space vertically using `\smallskip` and `\bigskip` +- commonly adviced to end a paragraph before a font size change. as TeX +calculates interline spacing depending on the font size. +- make your own commands/macros:\ + `\newcommand{\TUG}{\emph{\textbf{\TeX\ Users Group}}\xspace}` +
A
misc/python.notes.md
@@ -0,0 +1,17 @@
+# Chapter 5 + + +## Other Numeric Types + +### Decimal Type + - The Decimal class provides useful features to work with decimals with fixed + precision. +### Fraction Type + - Fraction and Decimal type provide more accuracy and simplify results. + automatically +### Sets + - They are unordered, immutable, unique collection of objects and follow the + mathematical definition of sets. + - They behave like valueless dicts. + - A literal set is represented by `{1,2,3}` +
A
misc/sql.notes.md
@@ -0,0 +1,22 @@
+ +# Keys and Tables + + - There is a uniqe primary key for each row + - Columns are attributes to that row + - Surrogate keys are primary keys that do not mean + anything out of the table (i.e IRL) + - Foreign key links to another table. Its the primary + key of a particular row of another table + - Foreign keys can also point to the same table + - Composite keys are a pair of primary keys that on their + own might not be uniqe for all the rows but they are + unique as a pair [36m20s](https://www.youtube.com/watch?v=HXV3zeQKqGY&t=36m20s) + - Composite keys can also be foreign keys + + +# SQL + - USE <db> + - CREATE TABLE `table_name` + + +
A
vedanta/aparokshanubhuti/aparokshanubhuti.tex
@@ -0,0 +1,1110 @@
+\documentclass{article} +\usepackage{fontspec} +\usepackage{polyglossia} +\usepackage{framed} +\usepackage{xcolor} +\definecolor{shadecolor}{gray}{0.92} +\setdefaultlanguage{english} +\setotherlanguages{hindi} +\newfontfamily\devanagarifont[Script=Devanagari]{Sanskrit 2003} +\title{Notes on Aparokshânubhuti} +\author{Prithu Goswami} +\date{} + +\begin{document} +\maketitle + +\begin{shaded} +Aparokshânubhuti is an introductory text about the philosophy of Vedâta written +by Adi Shankaracharya. + +These notes are written while listening to Swami Sarvapriyananda's lectures on +Aparokshanubhuti. In this series of talks, Swami Sarvapriyananda lucidly +unfolds the path to direct "Self-Realization" presented by Adi Shankaracharya +in Aparokshanubhuti. The text for this series is a translation of Adi +Shankaracharya's Aparokshanubhuti by Swami Vimuktananda. Vidyaranya has written +commentary to this text and Swami Saravpriyananda uses his explanations and +base his explanations off of his for some of the verses. + +The Lectures can by found on VedantaNY's Soundcloud:\\ +{\footnotesize\texttt{https://soundcloud.com/vedantany/sets/aparokshanubhuti-swami-sarvapriyananda}} +\end{shaded} + + + +\begin{large} +\begin{hindi} + \begin{center} + श्रीहरि परमानन्दमुपदेष्टारमीश्र्वरम् ।\\ + व्यापकं सर्वलोकानां कारणं तं नमाम्यहम् ॥ १ ॥ + \end{center} +\end{hindi} +\end{large} + +\texthindi{अहं} +I +\texthindi{परमानन्दं} +Supreme Bliss +\texthindi{उपदेष्टारं} +the First Teacher +\texthindi{ईश्वरं} +Iswara (the Supreme Ruler) +\texthindi{व्यापकं} +All-pervading +\texthindi{सर्वलोकानां} +of all Lokas (worlds) +\texthindi{कारणं} +Cause +\texthindi{तं} +Him +\texthindi{श्रीहरि} +to Sri Hari +\texthindi{नमामि} +bow down. + +\bigskip + +\textbf{ + 1. I$^1$ bow down to Him--to Sri Hari (the destroyer of ignorance), the + Supreme Bliss, the First Teacher, Iswara, All-pervading One and the + Cause$^2$ of all Lokas (the universe). +} + +{\small +\textit{$^1$I} --- The ego, the Jiva in bondage, who identifies himself with +the gross, subtle and causal bodies, undergoes various sufferings and strives +for liberation. + +\textit{$^2$The Cause} --- The efficient as well as the material cause. Just +as a spider weaves its net from the materials of its own body, so does +Iswara create this universe out of Himself. +} + +\begin{oframed} +It's a tradition in the vedanta books to praise and bow down to God and +seek his blessings. +\texthindi{श्रीहरि} +is another name of Vishnu. The very nature of Lord is bliss ( +\texthindi{परमानन्दं} +- Supreme Bliss). +\texthindi{उपदेष्टारं} + means the first teacher. All the Gurus have a lineage and all of them point to +God. It is with the grace of God that we learn about spirituality and it's +nature. It starts with God and he is the one who teaches us. They say that a +good Karma leads to one's attainment of knowledge of Brahman. +\texthindi{तं नमाम्यहम्} +- I bow down to you who is all-pervading ( +\texthindi{व्यापकं} +) + and the Cause of all the worlds ( +\texthindi{सर्वलोकानां} +) +\end{oframed} + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + अपरोक्षानुभूतिर्वै प्रोच्यते मोक्षसिध्दये ।\\ + सद्भिरेव प्रयत्नेन वीक्षणीया मुहुर्मुहुः ॥ २ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{26:15} + +\texthindi{मोक्षसिद्धये} +For the acquisition of final liberation (from the bondage of ignorance) +\texthindi{वै} +(expletive) +\texthindi{अपरोक्षानुभूतिः} +(the means of attaining to) Self-realization +(\texthindi{अस्माभिः} +by us) +\texthindi{प्रोच्यते} +is spoken of in detail +\texthindi{सद्भिः} +by the pure in heart +\texthindi{एव} +only +(\texthindi{इयं} +this) +\texthindi{प्रयत्नेन} +with all effort +\texthindi{मुहुर्मुहुः} +again and again +\texthindi{वीक्षणीया} +should be meditated upon. + +\bigskip + +\textbf{ 2. Herein is expounded (the means of attaining to) Aparokshânubhuti +$^1$(Self-realization) for the acquisition of final liberation. Only the pure +in heart should constantly and with all effort meditate upon the truth herein +taught. } + +{\small \textit{$^1$ Aparokshânubhuti} --- It is the direct cognition of the +Âtman which is always present in all thought. + +Everybody has some knowledge of this Âtman or Self, for, to deny the Self is to +deny one's own existence. But at first its real nature is not known. Later on, +when the mind becomes purer through Upâsanâ and Tapas, the veil of ignorance is +gradually withdrawn and the Self begins to reveal its real nature. A higher +knowledge follows at an advanced stage, when the knowledge of the `Self as mere +witness' is seen as absorbing all other thoughts. + +But the end is not yet reached. The idea of duality, such as `I am the witness' +(`I' and the `witness'), is still persisting. It is only at the last stage when +the knower and the known merge in the Self-effulgent Âtman, which alone ever +\textit{is}, and besides which nothing else exists, that the culmination is +reached. This realization of the \textit{non-dual} is the consummation of +Aparokshânubhuti. + +It is needles to say that Aparokshânubhuti may here mean also the work that +deals with it. } + +\begin{oframed} +For attaining self-realization, one must intently enquire about what is being +taught here (The Aparokshânubhuti). There are three categories of experience +\texthindi{(अनुभूतिः)} +\texthindi{- प्रत्यक्षः, परोक्षः, अपरोक्षः -} +\texthindi{प्रत्यक्षः} +means sense-perception. Everything we hear, everything we see, taste, etc +through our sense organs is +\texthindi{प्रत्यक्षः}. +\texthindi{अक्षः} literaly means the eyes but also means +the sense organs. The knowledge and experience we gain +through our sense organs is +\texthindi{प्रत्यक्षः}. +There are five of these senses. We also get knowledge in another way, we think +about the things we experience, we infere throught observations we have . The +whole of science is this. Observation and inference. Perceptions can be made +also using other tools that the humans have inventeded. So this knoweledge we +get based on what we see/hear after drawing conclusions is called +\texthindi{परोक्षः} +. Like atoms for example. We don't see them but we have drawn a conclusion that +everything is made up of atoms through experiments and different theories +by many people. All of religion is also Paroksha. There it's the beliefs that +are present in the religions that we develop on the basis of faith. Paroksha +is something 'beyond senses'. But Vedânta is neither Paroksha or Pratyksha. +\texthindi{अपरोक्षः} +is something beyond Prathksha and Paroksha. Its the very pure consciousness +itself. It's an attribute of Brahman. +The basis of our senses is because of +\texthindi{अपरोक्षः} +. And the self is pure consiousness and bliss which is +\texthindi{अपरोक्षः} +It's all here. This is Brahman but we need to realise it and that is what +Aparokshânubhuti is. Teaching in Vedâta is all about pointing out. It points +out what is already there - Brahman. +Those who are pure in heart should constantly meditate with all effort again +and again. + +\end{oframed} + + +\begin{large} +\begin{center} + \begin{hindi} + स्ववर्णाश्रमधर्मेण तपसा हरितोषणात् ।\\ + साधनं प्रभवेत् पुंसां वैराग्यादिचतुष्टयम् ॥ ३ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-02:49} + +\texthindi{स्ववर्णाश्रमधर्मेण} +By the performance of duties pertaining to one's social order and stage in +life +\texthindi{तपसा} +by austerity +\texthindi{हरितोषणात्} +by propitiating Hari (the Lord) +\texthindi{पुंसां} +of men +\texthindi{वैराग्यादि} +Vairâgya (dispassion) and the like +\texthindi{चतुष्टयं} +the four-fold +\texthindi{साधनं} +means (to knowledge) +\texthindi{प्रभवेत्} +arises. + +\bigskip + +\textbf{ 3. The four preliminary qualifications$^1$ (the means to the +attainment of knowledge), such as Vairâgya (dispassion) and the like, are +acquired by men by propitiating Hari (the Lord), through austerities and the +performance of duties pertaining to their social order and stage in life. } + +{\small +\textit{$^1$The four preliminary qualifications} --- There are +\texthindi{वैराग्यं} +dispassion, +\texthindi{विवेकः} +discrimination, +\texthindi{शमादिषट्सम्पत्तिः} +six treasures such as Sama (the control of the mind) and the like, and +\texthindi{मुमुक्षुत्वं} +yearning for liberation (from the bondage of ignorance). +} + +\begin{oframed} + +There are some duties and responsibilities of a person in their social life. +One must not give up his life to persue the quest of knowing oneself. There is +a social obgligation and it's good not give them up. One must complete what one +has started. There were stages in life where there were certain duties and +responsibilies of a man. Shankaracharya says that the Vernacular system that +was setup in ancient India was for the very purpose of realizing Brahman. And +they do help in one or other way in realizing non-dualism. One must not disturb +the external world and lead a disciplined life and cultivate realization at the +same time. + +There are four preliminary qualification required - +\texthindi{वैराग्यं, विवेकः, शमादिषट्सम्पत्तिः, मुमुक्षुत्वं} + +\texthindi{विवेकः} +- Differentiation between the eternal and temporary. + +\texthindi{वैराग्यं} +- Dispassion for the temporary and a desire to know the eternal. + +\texthindi{शमादिषट्सम्पत्ति} +- The six treasures/disciplines. + +\texthindi{मुमुक्षुत्वं} +- A strong desire for spirituality and liberation. + +\end{oframed} + +\begin{large} +\begin{center} + \begin{hindi} + ब्रह्मादिस्थावरान्तेषु वैराग्यं विषयेष्वनु ।\\ + यथैव काकविष्ठायां वैराग्यं तद्धि निर्मलम् ॥ ४ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-20:53} + +\textbf{4. The indifference with which one treats the excreta of a crow - such an +indifference to all objects of enjoyment from the realm of Brahmâ to this +world (in view of their perishable nature), is verily called pure Variâgya. +} + +\smallskip + +\begin{oframed} +As we want to be happy, we see avenues of happiness in this world. We come to a +realization that none of them provide permanent satisfaction. There are +satisfactions in life but they are not the purpose in life. One who is +spiritually inclined should not persue these pleasures in world. Also the +concept of heaven should be dismissed as it too is temprary pleasure and +spiritulaity is beyond that too. +\end{oframed} + + + + +\begin{large} +\begin{center} + \begin{hindi} + नित्यमात्मस्वरुपं हि द्रश्यं तद्विपरितगम् ।\\ + एवं यो निश्र्चयः सम्यग्विवेको वस्तुनः स वै ॥ ५ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-31:13} + +\textbf{5. Âtman (the seer) in itself is alone permanent, the seen is opposed +to it (i.e. transient) - such a settled conviction is truly known as discrimination (Viveka) +} + +\begin{oframed} +\texthindi{विवेकः} +means `to separate'. Life serves both, the eternal and the termperal. +The ability to discriminate in life between the two is +\texthindi{विवेकः} +There is a eternal truth and having the clarity is what is important. Feeling +that there is something to this spiritual life is +\texthindi{विवेकः}. +\end{oframed} + + +\begin{large} +\begin{center} + \begin{hindi} + सदैव वासनात्यागः शमोऽयमिति शब्दितः ।\\ + निग्रहो बाह्यवृत्तीनां दम इत्यभिधीयते ॥ ६ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-38:50} + +\textbf{6. Abandonment of desires at all times is called Sama and restraint +of the external functions of the organs is called Dama. +} + +\begin{oframed} +Quitening of mind is what is Sama (or control of mind) and Dama is the control +of the external body or the motor organs. Quitening of mind is not possible +with the mind filled with various desires. +6 treasure: +1. Sama +2. Dama +3. Uparati +4. Titiksha +5. Sradha +6. Samadhana +\end{oframed} + +\begin{large} +\begin{center} + \begin{hindi} + विषयेभ्यः परावृत्तिः परमोपरतिर्हि सा ।\\ + सहनं सर्वदुःखानां तितिक्षा सा शुमा मता ॥ ७ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-44:30} + +\textbf{ +7. Turning away completely from all sense-objects is the height of Uparati, +and patient endurance of all sorrow or pain is known as Titikshâ which is +conducive to happiness. +} + +\begin{oframed} +Uparati is the opposite of \textsl{rati} - the enjoyment of worldly things +through the five senses. Not seeking pleasures outside but within is Uparati. +One must know to be to himself in solitude. Endurance is also important +(Titikshâ) as the world will try to draw you away from spirituality. +\end{oframed} + + + +\begin{large} +\begin{center} + \begin{hindi} + निगमाचार्यवाक्येषु भक्तिःश्रद्धेति विश्रुता ।\\ + चित्तैकाग्रयं तु सल्लक्ष्ये समाधानमिति स्मृतम् ॥ ८ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-52:20} + +\textbf{8. Implicit faith in the words of the Vedas and the teachers ( +who interpret them) is known as Sraddhâ, and concentration of the mind on the +only object Sat (i.e. Brahman) is regarded as Samâdhâna. +} + +\begin{large} +\begin{center} + \begin{hindi} + संसाराबंधनिर्मुक्तिः कथं मे स्यात् कदा विधे ।\\ + इति या सु्दृढा बुद्धिर्वक्तव्या सा मुमुक्षुता ॥ ९ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{2-57:45} + +\textbf{9. When and how shall I, O Lord, be free from the bonds of this world +(i.e. births and deaths) - such a burning desire is called Mumukshutâ. +} + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + उक्तसाघनयुक्तेन विचारः पुरुषेण हि।\\ + कर्तव्यो ज्ञानसिद्धयर्थमात्मनः शुभमिच्छता ॥ १० ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{3-02:38} + +\textbf{ 10. Only that person who is in possession of the said qualifications +(as means to Knowledge) should constantly reflect$^1$ with a view to attaining +Knowledge, desiring his own good$^2$. +} + +{\small\textit{$^1$ Should constantly reflect} --- After a person has +attained the tranquillity of the mind through Sâdhanaâs, he should strive hard +to maintain the same by constantly reflecting on the evanescent nature of this +world and withal dwelling on the highest Truth till he becomes one with It.} + +{\small\textit{$^2$ Good} --- The highest good, i.e liberation from the bondage +of ignorance.} + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + + नोत्पधते विना ज्ञानं विचारेणान्यसाधनैः।\\ + यथा पदार्थभानं हि प्रकाशेन क्वचित् ॥ ११ ॥ + + \end{hindi} +\end{center} +\end{large} +\texttt{3-22:07} + +\textbf{11. Knowledge is not brought about by any other means$^1$ than Vichâra, +just as an object is nowhere perceived (seen) without the help of light.} + +{\small\textit{$^1$ By any means} --- By Karma, Upâsanâ and the like. It is ignorance or Avidyâ which has witheld the light of Knowledge from us. To get at Knowledge, therefore, we have to remove this Avidyâ. But so long as we are engaged when we make an enquiry into the real nature of this Avidyâ that it gradually withdraws and at last vanishes; then alone Knowledge shies.} +\begin{oframed} +Knowing yourself will lead you to happines. We are sad because we don't know +who we are (Avidyâ). Happines is an internal state and someone can be happy +even if he/she is suffereing. And someone who has everything externally can +also be quite sad. And there are examples of this in the world. Ignorance +about the self leads to actions in the world as we are looking for happines. +Action leads to consequence and we are trapped in the cycle of birth and death. +Ignorace > Desire > Action. Once there is action we are trapped in +\texthindi{संसारा} +. Knowledge removes the ignorance, and you realize yourself as being complete +and all the desires to attain happines from the world are no longer needed. +\end{oframed} + + + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + + कोऽहं कथमिदं जातं को वै कर्ताऽस्य विधते।\\ + उपादानं किमस्तीह विचारः सोऽयमीदृशः ॥ १२ ॥ + + \end{hindi} +\end{center} +\end{large} +\texttt{3-34:00} + +\textbf{ 12. Who am I?$^1$ How is this (world) created? Who is its creator? Of +what material is this (world) made? This is the way of that Vichâra$^2$ +(enquiry) } + +{\small\textit{$^1$Who am I?} --- We know that we are, but we do not +know what our real \textit{nature} is. In the waking state we think that we are +the body, the physical being, and consquently feel ourselves strong or weak, +young or old. At another time, in the dream state, regardless of the physical +existence we remain only in a mental state, where we are merely thinking beings +and feel only the misery or happiness that our thoughts create for us. Again, +in deep sleep, we enter into a state where we cannot find the least trace of +any such attribute whereby we can either assert or deny our existence. + +We pass through these states almost daily and yet do not know which of them +conforms to our real nature. So the question, 'Who am I?' is always with us an +unsolved riddle. It is, therefore, necessary to investigate into it. + +\textit{$^2$This is the way of that Vichâra} --- It is said in the preceding +Sloka that Knowledge is attainable by no other means but Vichâra or an enquiry +into the Truth. Herein is inculcated in detail the method of such an enquiry } + + +\bigskip + + +\begin{oframed} +This Sloka sets forth the main theme of the text. +There are enquiry of three entities: +\begin{enumerate} + \item{ + \texthindi{जीवः} + - Who am I? + } + \item{ + \texthindi{जगतः} + - What is this world? + } + \item{ + \texthindi{ईश्वरं} + - Who is God/Brhaman? What is his/its nature? + This question is divided into two: 1. The material cause and + 2. Efficient cause (the intelligence who made the universe) + + } +\end{enumerate} + + +Taking the example of the clay pot - Is the clay in the pot? Well no. The whole +pot \textit{is} the clay. The clay is in the \textit{form} of the pot. And +there exists no such thing as a pot apart from the clay. Just like that, we +are the real nature (Brahman), we don't exist apart from it. It is our +reality. Also, is there a pot in the clay? No. The clay is the only thing +there is and it, as well, is made up of atoms and molecules. But we can't say +the pot is in the clay. The clay has no knowledge of the pot. It exists +without the pot, but the pot cannot exist without the clay. The same way - +Is the universe in consciousness? or the consciousnes in the universe? The +pot is a name and form and is imagined in the clay. In the same way the +fundamentalss of the universe - time, space, causation are imagined in pure +consciousness (Brahman). You'll know that there is no pot in the clay, +there is only clay. We will see that all of this universe, including us is +something that is imagined/superimposed/projected in consciousness. +Consciousness alone is real. + +From the next verse, the three enquiries are taken up and go on till the end of + the text. + +\end{oframed} + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + + नाहं भूतगणो देहो नाहं चाक्षगणस्तथा ।\\ + एतद्विलक्षणः कश्चिद्विचार सोऽयमीदृशः॥ १३ ॥ + + \end{hindi} +\end{center} +\end{large} +\texttt{4-08:53} + +\textbf{ 13. I am neither the body$^1$, a combination of the (five) elements +(of matter), nore am I an aggregate of the senses; I am something different +from these. This is the way of that Vichâra. } + +{\small\textit{$^1$I am neither the body} --- This body has its origin in +insentient matter and as such it is devoid of consciousness. If I be the body, +I should be unconscious; but by no means am I so. Therefore I cannot be the +body.} + +\begin{oframed} + +We think we are the body-mind system. Vedanta assures that we are mistaken by +this. This body is not ours and when we claim that the body is ours there +is suffering. The body is made of the five elements(atoms, subatomic +particles according to today's science) which we did not make and we don't +own them thus the body is also not ours. We don't own the materials and so +we can't claim the body to be ours or say that `I am this body'. + +[Swam Sarvapriyananda uses Vidyarnya's commentaries here] - The experiencer +and the experienced are two different things and I being the experiencer, +experience things in this world. I am the experiencer of my physical body +and hence I cannot be experienced object i.e. The body. The materialists +say `If you are not the physical body, why don't we say that you are the +mind and the sense organs as you use them to experience your body'. But the +sense organs themselves are the objects of our experience. The mind can +also be the object of our experiences just like any other objec in the +world. Therefore I am not even the sense organs and the mind. The mind is +also an object, an instrument. As I am the experiencer and I experience +something, I cannot be the experienced object. The mind and the sense +organs are just instruments to experience the world and infact themselves +as well. I am something other than these objects (mind and sense organs). I +am very different from all of this, the body and the mind. `something' +becuase pure consciousness cannot be expressed with the use of language. + +\end{oframed} + + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + अज्ञानप्रभवं सर्व ज्ञानेन प्रविलीयते ।\\ + संकल्पो विविधः कर्ता विचारः सोऽयमीदृशः ॥ १४ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{4-28:38} + +\texthindi{सवं } +Everything +\texthindi{अज्ञानप्रभवं} +produced by ignorance +(\texthindi{अस्ति} +is) +\texthindi{ज्ञानेन} +through Knowledge +(\texthindi{तत् } +that) +\texthindi{ प्रविलीयते } +completely disappears +\texthindi{विविधः } +various +\texthindi{ संकल्पः} +thought +\texthindi{ कर्ता} +creator +(\texthindi{भवति } +is ) +\texthindi{सोऽयं, } +etc. + +\bigskip + +\textbf{14. Everything is produced by ignorance,$^1$ and dissolves in the wake +of Knowledge. The various thoughts (modifications of Antahkarana) must be the +creator.$^2$ Such is this Vichâra. +} + + +{\small +\textit{$^1$Everything is produced by ignorance} --- In reply to the +question in Sloka 12 as to the caus of this world it is here said that +ignorance is the cause of everything. + +Sometimes seeing something coiled up on the road we mistake it for a snake and +shrink back out of fear. But afterwards when we discover that it is nothing but +a piece of rope, the question arises in the mind as to the cause of the +appearance of the snake. On enquiry we find that the cause of it lies nowhere +else than in our ignorance of the true nature of the rope. So also the cause of +the phenomenal world that we see before us lies in the ignorance or Mâyâ that +covers the reality. + +\textit{$^2$The various thoughts ... the creator} --- The only thing that we +are directly aware of is our own thoughts. The world that we see before us is +what our thoughts have created for us. This is clearly understood when we +analyse our experiences in dreams. There the so-called material world is +altogether absent, and yet the thoughts alone create a world which is as +material as the world now before us. It is, therefore, held that the whole +universe is, in the same way, but a creation of our thoughts. +} + + +\begin{oframed} + +This Sloka is answering the question `What is this world?'. The reason we +experience this world is due to ignorance, just like we don't know the +reality of a rope lying and mistake it to be snake. Whatever we know +through ignorance is false, just like how we see a mirage in the dessert or +the snake in the rope. The sky seems blue but it's due to scattering of the +light and it appears to be blue. It not actually is blue. That whcih is +falsed doesn't mean it can't be experience, it's just that it doesn't exist +but still it appears. The water isn't in the dessert but it appears, the +snake isn't there but it appears as the rope. Just like the world appears +but doesn't exist, although we experience it. Even if it's false we still +experience but we realize the truth. Just like that we realize Brahaman but +we still continue to experience the world. What we see as the world is in +reallity Brahman. Upon enlightenment we realize this. + +Which Knowledge removes which Ignorance? Knowledge will remove ignorance only +if the locus and object of the knowledge and ignorance is the same. For +example - If I don't know Physics I have Ignorance in my mind(locus) about +Physics (object). So there must be a Knowledge in my mind(locus) about +Physics (object) to remove the ignorance. When there is Knowledge, the +ignorance disappears in a flash just like how we strike a match and +darkness of a thousand years disappears in a flash. + +\end{oframed} + +\bigskip + +\begin{large} +\begin{center} + \begin{hindi} + एतयोर्यदुपादानमेकं सूक्षमं सदव्ययम् ।\\ + यथैव मृद्घटादीनां विचारः सोऽयमीदृशः ॥ १५ ॥ + \end{hindi} +\end{center} +\end{large} + +\texthindi{यथैव } +Just as +\texthindi{घटादीनां } +{of the pot and the like } +(\texthindi{उपादानं } +material) +\texthindi{मृत् } +earth +(\texthindi{भवति } +is, +\texthindi{तथैव } +so also) +\texthindi{एतयोः } +{of these two } +\texthindi{यत् } +{which } +\texthindi{उपादानं } +{material } +(\texthindi{तत् } +that) +\texthindi{एकं } +one +\texthindi{सक्षमं } +{subtle } +\texthindi{अव्ययं } +{unchanging } +\texthindi{सत् } +Sat (Existence) +(\texthindi{अस्ति} +is) +\texthindi{सोऽयं , } +etc. + +\bigskip + +\textbf{ + 15. The material (cause) of these two (i.e ignorance and thought) is the one$^1$ (without a second), subtle (not apprehended by the senses) and unchanging Sat (Existence), just as the earth is the material (cause) of the pot and the like. This is they way of that Vichâra. +} + +{\small \textit{$^1$ One} --- Because it does not admit of a second of the same +or of a different kind, or of any parts within itself. It is one homogeneous +whole. } + +\begin{oframed} + We have Karma and we need the world to experience and pay for the Karma + because of Desires. Thinking + \texthindi{(संकल्पः)} + leads to Desires + \texthindi{(कामः)} + and Desires leads to Karma + \texthindi{(कर्मः)}. + God gives us this world in order to give us opportunities to experience + the results of our Karma. + + What is the material cause of this universe? It is Sat (Existence). We are + in an ocean of Existence. And Existence in itself is Brahman. The material + cause of something is that which gives it existence. The clay is the + material cause of the pot as it gives it existence. Just like that, the + material cause of the entire universe is Sat (Existence) or Brahman. Also, + both the material cause and efficent cause of the universe is Brahman. + Brahman itself made the universe happen (Check footnote \#2 of the first + verse). Brahman alone is real, the universe is an appearance, and you, the + individual, are Brahman. + +\end{oframed} + + +\begin{large} +\begin{center} + \begin{hindi} + अहमेकोऽपि सूक्ष्मश्च ज्ञाता साक्षी सदव्ययः ।\\ + तदहं नात्र सन्देहो विचारः सोऽयमीदृशः ॥ १६ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{5-1:25} + +(\texthindi{यस्मात्} +Because) +\texthindi{अहं} +I +\texthindi{अपि} +also +\texthindi{एकः} +one +\texthindi{सूक्ष्मः} +the subtle +\texthindi{च} +(expletive) +\texthindi{ज्ञाता} +the Knower +\texthindi{साक्षी} +the Witness +\texthindi{सत्} +the Existent +\texthindi{अव्ययः} +the Unchanging +(\texthindi{अस्मि} +am, +\texthindi{तस्मात्} +therefore) +\texthindi{अहं} +I +\texthindi{तत्} +``That" +(\texthindi{अस्मी} +am) +\texthindi{अत्र} +here +\texthindi{सन्देहः} +doubt +\texthindi{न} +not +(\texthindi{अस्ति} +is) +\texthindi{सोऽयं,} +etc. + +\bigskip + +\textbf{ 16. As I am also the One, the Subtle, the Knower,$^1$ the Witness, the +Ever-Existent and the Unchanging, so there is no doubt that I am ``That"$^2$ +(i.e. Brahman). Such is this enquiry. } + +{\small \textit{$^1$The Knower} --- The supreme Knower who is ever present in +all our perceptions as consciousness, and who perceieves even the ego. + +When I say, ``I know that I exist," the ``I" of the clause `that I exist' forms +a part of the predicate and as such it cannot be the same `I' which is the +subject. This predicative `I' is the ego, the object. The subjective `I' is the +supreme Knower. + +\textit{$^2$ I am ``That"} --- I, the ego, when stripped of all its limiting +adjuncts, such as the body and the like, becomes one with ``That," the supreme +Ego, i.e. Brahman. In fact, it is always Brahman ; Its limitation being but the +creation of ignorance. } + +\begin{oframed} + + In advaita vedanta there are three things to remember: 1. Don't identify + yourself with anything that is an object and that is limited. 2. Know + yourself as Brahman. See the subject as the infinite Brahman. 3. Look upon + the universe and recognize everything in the universe as you yourself, as + everything is Brahaman. The unchaning consiousness is the Witness, is also + the real us. The Knower is also us but limited to the body.The knower uses + the mind and the sense organs. The Witness on the other hand, doesn't + require these instruments of the body. + +\end{oframed} + +\begin{large} +\begin{center} + \begin{hindi} + +आत्मा विनिष्कलो ह्येको देहो बहुभिरावृतः ।\\ +तयोरैक्यं प्रपश्यन्ति किमज्ञानमतः परम् ॥ १७ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{5-18:12} + +\texthindi{आत्मा} +Âtman +\texthindi{हि} +verily +\texthindi{एकः} +one +\texthindi{विनिष्कलः} +without parts +(\texthindi{अस्ति} +is) +\texthindi{देहः} +the body +\texthindi{बहुभिः} +by many (parts) +\texthindi{आवृतः} +covered +(\texthindi{भवति} +is, +\texthindi{मृढाः} +the ignorant) +\texthindi{तयॊः} +of these two +\texthindi{ऐक्यं} +identity +\texthindi{प्रपश्यन्ति} +see (confound) +\texthindi{अतःपरम्} +else than this +\texthindi{किम्} +what +\texthindi{अज्ञानं} +ignorance +(\texthindi{अस्ति} +is) + +\bigskip + +\textbf{ 17. Âtman is verily one and without parts, whereas the body consists +of many parts; and yet people see (confound) these two as one! What else can be +called ignorance but this?$^1$ } + +{\small \textit{$^1$What else can be called +ignorance but this?} --- To give rise to confusion in knowledge is a unique +characteristic of ignorance. It is through the influence of ignoracne that one +confounds a rope with a snake, a mother-of-pearl with a piece of silver and so +on. But, after all, the power of ignorance is not completely manifest there; +for one could easily find an excuse for such confusions when there exist some +common characteristics between the real and the apparant. The nature of +ignorance is, however, fully revealed when one confounds the subject (i.e. +Âtman) with the object (i.e. the body), which have nothing in common between +them, being opposed to each other in all respects. } + + +\begin{oframed} + +In the first stage we are trying to find the true nature of `I'. Our + understanind of the self must be refined. From here on we are going to do + just that - refine the meaning of `I'. Subject and Object (I and this). + Whatever we say is this is not I. The problem start with the this (pointing + to body). We include the body in the meaning of `I'. The body is an object + of experience. You can feel it. You can hear it. You can smell it. + Everything that has `This'(object) has to be excluded from the + understanding of `I'. + + Identification with the body is a problem. How to loose that + identification? Swamiji gives three things to contemplate. We consider + ourself as `one' but we are composed of so many parts - the hand, the legs, + the eyes, and all the other various organs, tissues, cells, etc - but we + stil say or feel that `I am one'. You need to contemplate this distinction, + that even after consisting of so many things you feel that you are + `one'.Second, I alsways feel that I sensient and the body is the object of + my experience. Third, I always feel that I am the same and the body is + changing. + +\end{oframed} + + +\begin{large} +\begin{center} + \begin{hindi} + आत्मा नियामकश्चान्तर्देहो बाह्यो नियम्यकः ।\\ + तयोरैक्यं प्रपश्यन्ति किमज्ञानमतः परम् ॥ १८ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{5-34:00} + +\texthindi{आत्मा} +Âtman +\texthindi{नियामकः} +the ruler +\texthindi{अन्तः} +internal +\texthindi{च} +and +(\texthindi{भवति} +is) +\texthindi{देहः} +the body +\texthindi{नियम्यकः} +the ruled +\texthindi{वाह्यः} +external +(\texthindi{भवति} +is) +\texthindi{तयोरैक्यं,} +etc. + +\bigskip + +\textbf{18. Âtman is the ruler of the body and internal, the body is the ruled +and external; and yet, etc. } + +\begin{oframed} + + Shankaracharya is pointing out here with his arguments. The body is + something that is controlled and we are the controller of that body. + The atman `lends' consciouness to the body and mind. + + The body is something that is outside and I am something inside. The + feeling of `I' we have is also infact an object and therefore it is not us. + +\end{oframed} + +\begin{large} +\begin{center} + \begin{hindi} +आत्मा ज्ञानमयः पुण्यो देहो मांसमयोऽशुचिः ।\\ +तयोरैक्यं प्रपश्यन्ति किमज्ञानमतः परम् ॥ १९ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{6-4:22} + +\texthindi{आत्मा} +Âtman +\texthindi{ज्ञानमयः} +all consciousness +\texthindi{पुण्यः} +holy +(\texthindi{भवति} +is) +\texthindi{देहः} +the body +\texthindi{मांसमयः} +all flesh +\texthindi{अशुचिः} +impure +(\texthindi{भवति} +is) +\texthindi{तयोरैक्यं,} +etc. + +\bigskip + +\textbf{ + 19. Âtman is all consiousness and holy, the body is all flesh and impure; + and yet, etc. +} + + +\begin{large} +\begin{center} + \begin{hindi} +आत्मा प्रकाशकः स्वच्छो देहस्तामस उच्यते ।\\ +तयोरैक्यं प्रपश्यन्ति किमज्ञानमतः परम् ॥ २० ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{6-12:37} + +\texthindi{आत्मा} +Âtman +\texthindi{प्रकाशकः} +the Illuminator +\texthindi{स्वच्छः} +pure +\texthindi{देहः} +the body +\texthindi{तामसः} +of the nature of darkness +\texthindi{उच्यते} +is said +\texthindi{तयोरैक्यं,} +etc. + +\bigskip + +\textbf{20. Âtman is the (supreme) Illuminator and purity itself; the body is +said to be of the nature of darkness; and yet, etc.} + +\begin{large} +\begin{center} + \begin{hindi} + आत्मा नित्यो हि सद्रूपो देहोऽनित्यो ह्यसन्मयः ।\\ + तयोरैक्यं प्रपश्यन्ति किमज्ञानमतः परम् ॥ २१ ॥ + \end{hindi} +\end{center} +\end{large} +\texttt{6-31:00} + +\texthindi{आत्मा} +Âtman +\texthindi{नित्यः} +eternal +\texthindi{हि} +since +\texthindi{सद्रूपः} +Existence itself +\texthindi{देहः} +the body +\texthindi{अनित्यः} +transient +\texthindi{हि} +because +\texthindi{असन्मयः} +non-existence in essence +\texthindi{तयोरैक्यं,} +etc + +\bigskip + +\textbf{21.Âtman is eternal, since it is Existence itself: the body is +transient, as it is non-existence in essence;$^1$ and yet, etc. +} + +{\small \textit{$^1$The body is ... non-existence in essence} --- The +body is undergoing change at every moment, and as such, cannot be eternal. +But granting that it is non-eternal, how can it be non-existent? -- for, so +long as it lasts we surely see it as existing. +} + + +\begin{oframed} + + +\end{oframed} + +\end{document}