RoyalIcing / DiscreteMaths

Discrete Maths

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discrete Maths

Term 2:

Speaking Mathematically

The Logic of Compound Statements

Logic, bitwise logic and truth tables

The Logic of Quantified Statements

Elementary Number Theory

  • Div (/), Mod (%), floor, truncate, Ceil, sqrt, cbrt, Power,

  • Logarithm definition:

    logb(x) = y => Math.log(x, b) = y
    by = x => b ** y = x

    24 = 16 => 2 ** 4 = 16
    log2(16) = 4 => Math.log2(16) = 4 = Math.log(16,2)

    For example: Find the value of y where 2 ** y = 16
    y = Math.log(16,2) same as Math.log2(16)
    y = 4

    Find b where Math.log(16,b) = 4
    b4 = 16
    b = 16 ** (1/4.0)

    9 = 3 x 3
    Math.sqrt(9) = 3
    8 = 2 * 2 * 2
    Math.cbrt(8) = 2
    
  • http://www.rapidtables.com/math/algebra/Logarithm.htm Natural logarithm: ln(x) = log e (x) where e is 2.718281828459... e = lim x -> inf (1 + 1/x) ** x

    Math::PI => 3.141592653589793 Math::E => 2.718281828459045

Sequences, Mathematical Induction, and Recursion

Number systems base 10 to base 2 division by 2 (shift operator) Recursion - tail recursion - factorial Geometric sequences

Set Theory

Sets contain unique values.

Functions

Hash functions, Relations between Exponential and Logarithmic functions,

Relations

Cryptography, Topological sorting

Counting and Probability

Counting elements in a list, permutations and combinations, pascal's triangle

Graphs and Trees

Matrices, Simple graphs, Binary trees,

Analysis of Algorithm Efficiency

Binary search, merge sort, benchmarking https://www.toptal.com/developers/sorting-algorithms

Regular Expressions and Finate-State Automata

Regular Expressions

Properties of Real Numbers

Browser rendered....visual engaging example

binary bigger binary, octal 0-7, decimal, hexadecimal 0-F, ascii (chr, ord) 'A' 65 'a' 97 mask & 1 == 1 mask & 2 == 2 mask & 0b0100 == 0b0100 => unicode https://www.tutorialspoint.com/ruby/ruby_operators.htm

Logical Operators: and or xor Truth table - on and off => update and (&) or (|) xor (^?)

a = 0011 1100 b = 0000 1101

a&b = 0000 1100 # check flag a|b = 0011 1101 # set flag a^b = 0011 0001 # xor - merge -
~a = 1100 0011 # binary ones compliment - flip bits

Jamie - Trent - User Stories, Planning, dbdesigner visualize ER-Diagram/schema MVC, generate model Controler, hidden fields, communication b/w, turbo links (rendering partials) - ajax - devise , socket action cable session gaming chat, async

rails new proj && cd proj if str == nil || str.length = 0 null of empty 1 0 0 0 1 0 1 1 0 0 0 1

0b010 1 0b01 2 0b10 4 8 16

Number system.

Series, patterns, infinite series, recursive definitions 1/3 0.3333333333333333 float: left; width: 30%; margin: 10/6 = 1.7%; trunc floor ceil mod

Big-O notation, algorithms, optimisation, benchmark

Matrices multi dimensions

Sets - Unique

Probability, permutations and combinations

  a b c

  a b
  a c


About

Discrete Maths


Languages

Language:Ruby 80.9%Language:HTML 15.8%Language:JavaScript 3.4%