NOTES ON REVERSING A LINKED LIST
ERIC MARTIN
1. Iterative version (linear)
i f not s e l f . head :
return
node = s e l f . head . n e x t n o d e
s e l f . head . n e x t n o d e = None
w h i l e node :
n e x t n o d e = node . n e x t n o d e
node . n e
NOTES ON LEVENSHTEIN DISTANCE
ERIC MARTIN
1. levenshtein distance(depart, leopard)
Deletion (cost 1) of a letter x in first word: x
Insertion (cost 1) of a letter x in second word: x
. Match (cost 0) of the same letter x in both words: xx
Substitution (
NOTES ON PROLOG EXECUTION
ERIC MARTIN
1. Program
concat(a, Y, Y).
concat(f(X), Y, f(Z) :- concat(X, Y, Z).
concat(g(X), Y, g(Z) :- concat(X, Y, Z).
compress(a, a).
compress(f(a), f(a).
compress(g(a), g(a).
compress(f(f(X), Y) :compress(g(g(X), Y) :compres
NOTES ON STACKS AND DEPTH FIRST SEARCH
ERIC MARTIN
1
2
4
5
3
6
7
8
11
10
13
12
9
Popping a path from the top of the stack (right of list) and pushing its extensions from right to left to the top of the
stack.
[1]
[1]
[1, 5], [1, 4], [1, 2]
[1, 5], [1, 4
NOTES ON CONTINUED FRACTIONS
ERIC MARTIN
1. Paving a rectangle by squares, Euclids algorithm for computing the greatest common divisor,
and finite continued fractions
Euclids algorithm determines that gcd(180, 64) = 4 by performing the computations displa
NOTES ON CONTEXT FREE GRAMMARS
ERIC MARTIN
1. Palindromes over cfw_a, b
1.1. Grammar.
S aSa | bSb |
1.2. Leftmost derivation example.
S aSa abSba abbSbba abbbSbbba abbbaSabbba abbbaaSaabbba abbbaaaabbba
2. cfw_bn am b2n | n 0, m 0
2.1. Grammar.
S bSbb |
SUBJECT: INFORMATION SECURITY
CLASS: VIII SEMESTER
SYLLABUS:
UNIT II
Classical Encryption Techniques
Block ciphers:
Simplified DES algorithm
Block cipher principles
Strength of DES
Block cipher design principles
Block cipher modes of operation
Characteris
Q on Networking Topics
Q.1 Each IP packet must contain _
a. Only Destination
b.Only Sourse
c.Source & destination
d.Sourse or Destination
RCOEM, Nagpur. BE VII Sem elective II Internetworking & TCP/IP
session 14-15
Lecture By Asst.Prof.Devishree Naidu,CSE
CPE 542: CRYPTOGRAPHY & NETWORK SECURITY
Chapter 7 Confidentiality Using Symmetric Encryption
Dr. Loai Tawalbeh
Computer Engineering Department
Jordan University of Science and Technology
Jordan
Dr. Loai Tawalbeh
Fall 2005
Confidentiality using Symmetric
The DES Algorithm Illustrated
by J. Orlin Grabbe
The DES (Data Encryption Standard) algorithm is the most widely used encryption algorithm
in the world. For many years, and among many people, "secret code making" and DES have
been synonymous. And despite
and treatment centers.
The increasing volume, value and confidentiality of these records regularly transmitted and stored by
commercial and government agencies has led to heightened recognition and concern over their
exposures to unauthorized access and u
Step 1: Create 16 subkeys, each of which is 48-bits long.
The 64-bit key is permuted according to the following table, PC-1. Since the first entry in the table is
"57", this means that the 57th bit of the original key K becomes the first bit of the permut
Cryptography and
Network Security
Chapter 10
Fifth Edition
by William Stallings
Lecture slides by Lawrie Brown
(with edits by RHB)
Outline
will consider:
Diffie-Hellman key exchange
ElGamal cryptography
Elliptic Curve cryptography
Pseudorandom Number
This means, for example, C3 and D3 are obtained from C2 and D2, respectively, by two left shifts, and C16
and D16 are obtained from C15 and D15, respectively, by one left shift. In all cases, by a single left shift is
meant a rotation of the bits one plac