j1k7_7's blog

By j1k7_7, history, 8 years ago, In English

Z-Algo

  1. https://www.spoj.com/problems/QUERYSTR/ Code
  2. https://www.spoj.com/problems/EPALIN/ Code
  3. https://www.spoj.com/problems/FINDSR/ Code
  4. https://codeforces.net/problemset/problem/471/D Code
  5. https://www.spoj.com/problems/NHAY/ Code
  6. https://codeforces.net/problemset/problem/126/B Code

TRIE

  1. https://www.spoj.com/problems/SUBXOR/ Code
  2. https://www.spoj.com/problems/PHONELST/ Code
  3. https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2683
  4. http://codeforces.net/problemset/problem/706/D Code
  5. http://codeforces.net/problemset/problem/665/E Code
  6. http://codeforces.net/problemset/problem/282/E Code
  7. http://codeforces.net/problemset/problem/271/D Code

Manacher Algorithm

  1. https://www.spoj.com/problems/MSUBSTR/ Code
  2. https://www.spoj.com/problems/LPS/ Code

Suffix Array

  1. https://www.spoj.com/problems/DISUBSTR/ Code
  2. https://www.codechef.com/INSQ2016/problems/INSQ16F
  3. http://codeforces.net/contest/452/problem/E Code
  4. https://www.hackerrank.com/challenges/ashton-and-string/problem Code
  5. https://www.hackerrank.com/challenges/string-similarity/problem Code

String Hashing

  1. http://codeforces.net/problemset/problem/514/C Code
  2. http://codeforces.net/contest/159/problem/D Code
  3. http://codeforces.net/contest/727/problem/E Code

Aho-corasick

  1. https://www.spoj.com/problems/SUB_PROB/
  2. https://www.codechef.com/problems/LYRC
  3. https://www.codechef.com/JULY12/problems/FAVNUM
  4. https://www.codechef.com/LTIME06/problems/QMARKS
  5. http://codeforces.net/contest/163/problem/E

Palindromic tree

  1. https://www.hackerrank.com/contests/world-codesprint-6/challenges/functional-palindromes Code
  2. https://www.hackerrank.com/contests/world-codesprint-5/challenges/challenging-palindromes/problem
  3. https://www.hackerearth.com/problem/algorithm/mancunian-and-fantabulous-genes-1/description/ Code

Random String problems:

  1. http://codeforces.net/gym/101532/problem/F Code
  2. http://codeforces.net/gym/101532/problem/D Code

Will add more soon!

Full text and comments »

  • Vote: I like it
  • +32
  • Vote: I do not like it

By j1k7_7, history, 8 years ago, In English

Hello, Codeforces!

This Blog consists of 20 Segment tree Problems (Easy , Medium and Hard ) from Spoj, Codeforces, LightOj along with the solutions.

http://jaskamalkainth.github.io/Segment-tree-Problems/

Learn and let learn!

Feel free to leave any comment or feedback on this blog. :)

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By j1k7_7, 10 years ago, In English

Hi!

Last few days were very tough for me , so I decided to contribute my knowledge which may help someone. Also this will make me feel better.

These are some Concepts which everyone should know and are widely used in Graph Theory.

Chromatic Number: Minimum number of colors required to color Graph G such that no two adjacent vertex gets same color.

Brooks' Therorem: For any connected undirected graph G with maximum degree Δ, the chromatic number of G is at most Δ unless G is a complete graph or an odd cycle, in which case the chromatic number is Δ + 1.

Independent Vertex Set: Set of vertices in a graph G ,no two of which are adjacent that means no two vertices in this set is connected by an edge. (no two of which are adjacent).

α(G) Vertex Independence Number is the cardinality of Largest Independence set.

Vertex Cover: Set of Vertices in a Graph G, such that each Edge in G incident on atleast one Vertex in the Set.

Vertex Covering Number is the cardinality of minimum vertex cover.

  • A set of vertices is a vertex cover if and only if its complement is an independent set.

  • The number of vertices of Graph G is equal to sum of minimum vertex covering number and maximum vertex independence number.

Edge Cover: Set of Edges in a Graph G, such that every vertex of G is incident on atleast one of the edges in the set.

ρ(G) Edge Covering number is the cardinality of minimum edge cover.

Dominating Set: Set of Vertices ,such that every vertex not in Set is adjacent to at least one member of Set OR Every vertex of G is adjacent to some Vertex of the Set.

γ(G) Dominance number is the number of Vertices in the smallest Dominating Set.

  • Independent Set is Maximal Independent iff it is a Dominating Set.

OR

  • Independent Set is Dominating Set iff it is Maximal Independent.

Thus,

  • Any maximal independent set in a graph is necessarily also a minimal dominating set.
  • Dominance Number is always less than or equal to Independence Number.

Matching: Set of edges of G ,such that no two of which are adjacent (pairwise non-adjacent edges) or no two edges share a common vertex.

ν(G) Matching number (edge independence number) is the size of maximum matching.

Matching -> non-adjacent edges

Vertex independent set -> non-adjacent vertex.

  • In any graph without isolated vertices, the sum of the matching number and the edge covering number equals the number of vertices.

ν(G) + ρ(G) = n

If Graph G = (V, E) is Bipartite then ,

  1. Vertex Independence number is equal to Edge covering number.

  2. Matching number is equal to vertex covering number. (König's theorem)

Clique :

A clique of a graph G is a complete subgraph of G, and the clique of largest possible size is referred to as a maximum clique.

ω(G) Clique Number is the number of vertices in maximum clique in G.

  • χ(G) ≥ ω(G) Chromatic Number of G is always greater than or equal to Clique number.

A Maximal Independent vertex set of a graph G is equivalent to a Maximal Clique on the graph complement .

Some Problems :

http://www.codechef.com/problems/SEAGRP

http://www.codechef.com/problems/KMHAMHA

http://www.codechef.com/problems/MACGUN

http://www.codechef.com/CDCRFT14/problems/COPRIME

http://codeforces.net/problemset/problem/143/D Graph Theory Solution

http://www.codechef.com/DBYZ2013/problems/IITI11

More Problems

I Request everyone to share more Problems which involve these Concepts. Also If there is some Buggy Statement ,Please let me know.

IMP: I will keep updating this blog with new Concepts and Problems , Stay Tuned. : )

Thanks!

Full text and comments »

  • Vote: I like it
  • +92
  • Vote: I do not like it