Week 7

This Week • • • • •

Notepad++ Mercurial Valgrind Bitwise Operators Data Structures (Stacks, Queues, Hash Tables, Binary Search Trees, Tries)

Notepad++ • Tried emacs but still hate the terminal?  • Work in a GUI environment connected directly to the Cloud! • This is better than WinSCP and a text editor. You don’t want to do that.

Mercurial • RCS – Revision Control System • Better than doing this:

Valgrind • Pronunciation: val-grinned • For best results: – valgrind –v –leak-check=full

• Gives a report on status of memory allocated.

Bitwise Operators & - AND 1100 &1010 1000

| - OR 0011 |1010 1011

^ - XOR 1010 ^1100 0110

~ - NOT ~(1010) = 0101

Bitwise Encryption One-time pad: My string: 10001110 Encryption Key: 10011001 XOR Encrypted: 00010111 XOR Decrypted: 10001110

Bitwise Swap Without Temp Variable int swap(int* x, int* y) { *x ^= *y; *y ^= *x; *x ^= *y; }

X - 1001

Y - 1100

0101

1100

0101

1001

1100

1001

Data Structures • • • • •

Stacks Queues Hash Tables Binary Search Tree Tries

Stacks • First in, last out data structure. • Can ‘pop’ or ‘push’ things to the top of the stack.

Top

Queues • First in, first out data structure. • “Insert” and “Remove” operations.

Head

Tail

Hash Tables • Consists of an array and a hash function. • Hash function maps input to an index in the associated array. • Allows us to check whether something is contained in a data structure without checking through the entire thing.

Hash Tables Good Hash Functions are: • Deterministic • Well-distributed

int xkcd_hash(char* word) { return 4; }

THIS IS BAD

Binary Search Tree • Trees consist of ‘branches’. struct branch { struct branch* left; int val; struct branc* right; }

Binary Search Tree BST is such that: 1) Left subtree of each node contains only lesser nodes. 2) Right subtree of each node contains only greater nodes. 3) Left and right subtrees of each node are also binary search trees.

8

4

16

15

42

23

Tries • Tree of Arrays • Fast Lookup, High Memory Use struct trie_node { struct trie_node* array[N]; bool checkbox; }

Tries Array

Checkbox F

T

F

First two elements are in an array. First represents the letter ‘a’. Second represents the letter ‘b’. Checkbox indicates whether what we’ve looked at so far is in the data structure. “a”, “bb” are in this structure.

T

THE BIG BOARD

Bitwise Operators

to the Cloud! • This is better than WinSCP and a text ... Valgrind. • Pronunciation: val-grinned. • For best results: ... Bitwise Encryption. One-time pad: My string:.

358KB Sizes 0 Downloads 261 Views

Recommend Documents

Bitwise Operators
This is better than WinSCP and a text editor. You don't want to do that. ... valgrind –v –leak-check=full . • Gives a report on ... subtree of each node contains only lesser nodes. 2) Right subtree of each node contains only greater nodes. 3) L

Bitwise
May 5, 2000 - deal of time and energy into this thesis .... 3-1 Three alternative data structures for bitwidth analysis . . . . . . . . .18. 3-2. F ... dismiss this shift in emphasis as a consequence of abundant computing resources and expensive ...

Span operators
Blackwell Publishing Ltd.Oxford, UK and Malden, USAANALAnalysis0003-26382007 Blackwell Publishing Ltd.January 20076717279ArticlesBerit Brogaard. SPAN OPERATORS. Span operators. BERiT BROGAARD. 1. Tensed plural quantifiers. Presentists typically assen

Monotone Operators without Enlargements
Oct 14, 2011 - concept of the “enlargement of A”. A main example of this usefulness is Rockafellar's proof of maximality of the subdifferential of a convex ...

Monotone Operators without Enlargements
Oct 14, 2011 - the graph of A. This motivates the definition of enlargement of A for a general monotone mapping ... We define the symmetric part a of A via. (8).

owners and operators - Bell Customer
Feb 10, 2015 - Incorporated to transition all product support responsibility of the Bell 214B ... models, including spare parts supply, technical assistance, and ...

ON HOLOMORPHIC DIFFERENTIAL OPERATORS ...
holomorphic functions on the Hermitian half-space of degree n, which is ..... We use the operation ⊓ as in [Fr] and we refer to loc. cit. for its basic properties.

Learning Subspace Conditional Embedding Operators - Intelligent ...
Department of Computer Science, Computational Learning for Autonomous Systems (CLAS),. Technische ..... and applying the matrix identity A (BA + λI). −1. =.

ProLaser III Operators Manual.pdf
GRUPO EDITOR LATINOAMERICANO. Colección E'STUDIOS INTERNACIONALES. Page 3 of 47. ProLaser III Operators Manual.pdf. ProLaser III Operators ...

Suntanning Bed Operators License Application.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Suntanning Bed ...

ELTA Operators manual draft_RUS.pdf
Whoops! There was a problem loading more pages. Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps.

JACOBI FORMS AND DIFFERENTIAL OPERATORS
cally studied in the monograph by Eichler-Zagier (see [4]), map Jk,m(N) injectively ... restriction map from Jk,m(N) to Mk(N), the space of elliptic modular forms of ..... that we get (see [12]). (θm,1 |1. 2 ˜ϵ, θm,2 |1. 2 ˜ϵ,...,θm,2m |1. 2 Ë

ProLaser III Operators Manual.pdf
This speed determination is then displayed to the. operator. Page 3 of 47. ProLaser III Operators Manual.pdf. ProLaser III Operators Manual.pdf. Open. Extract.

Volvo a25c operators manual
Sign in. Page. 1. /. 18. Loading… Page 1 of 18. Page 1 of 18. Page 2 of 18. Page 2 of 18. Page 3 of 18. Page 3 of 18. Volvo a25c operators manual. Volvo a25c operators manual. Open. Extract. Open with. Sign In. Main menu. Displaying Volvo a25c oper

Bitwise: Optimizing Bitwidths Using Data-Range ...
May 5, 2000 - or newarchitectures that support sub-word data-types,we expect that our bitwidth ..... approach the accuracy of run-time profiling . D. W.

Learning Subspace Conditional Embedding Operators - Intelligent ...
Department of Computer Science, Computational Learning for Autonomous Systems (CLAS),. Technische Universität ... A well known method for state estimation and prediction ..... get good estimations of the conditional operators for highly.

NEW HOLLAND BB940A BB950A BB960A BALER OPERATORS ...
Retrying... NEW HOLLAND BB940A BB950A BB960A BALER OPERATORS MANUAL.pdf. NEW HOLLAND BB940A BB950A BB960A BALER OPERATORS MANUAL.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying NEW HOLLAND BB940A BB950A BB960A BALER OPERATORS MANUAL.pdf

NON-SELF-ADJOINT OPERATORS, INFINITE ...
of compact operators in K, which is analytic on Ω except for isolated singularities. Following Howland we call {L(z)}z∈Ω completely meromorphic on Ω if L is ...

LIEBHERR R902 LITRONIC EXCAVATOR OPERATORS OPERATING ...
LIEBHERR R902 LITRONIC EXCAVATOR OPERATORS OPERATING MANUAL (Serial no. from 4001).pdf. LIEBHERR R902 LITRONIC EXCAVATOR ...