Graph theory tutorials and visualizations. Interactive, visual, concise and fun. Learn more in less time.
seen from United States
seen from Hong Kong SAR China

seen from Malaysia
seen from Türkiye
seen from United States

seen from United States
seen from Mexico
seen from United States
seen from United Kingdom

seen from Italy
seen from China
seen from China
seen from China
seen from United States
seen from Canada

seen from Malaysia
seen from China
seen from Belarus
seen from Malaysia
seen from Belarus
Graph theory tutorials and visualizations. Interactive, visual, concise and fun. Learn more in less time.
Sitemize "Çok Dallı Ağaç" konusu eklenmiştir. Detaylar için ziyaret ediniz. https://enmodaa.com/cok-dalli-agac/
Teads Sponsored Contest
Also on codingame is another challenge, which might land you a job at Teads, some software company in France.
The challenge is simple, you recieve n (a number of edges) and n bi-directional edges in the form “<nr> <nr>“. The graph that it represents is a connected tree (no cycles, every node is reachable).
They want if the optimal root node is chosen in how many steps it can broadcast to any node. With their own picture:
If 1 is chosen as root, it will reach 2 in 1 step, 3 in 2 steps, 4 and 7 in 3 steps and 5,6 and 8 in 4 steps. If 3 is chosen as root however, it will reach every node in just 2 steps.
So when I looked at the problem, I realised that the cost is ceil(longest_path / 2). In my head dijkstra seemed like the best choice, so I went ahead and made a C-implementation of dijkstra using an n x n matrix (n = nr of nodes). I would be able to extract the max path by just taking the max of the matrix.
I then ran it, and to my surprise... too slow with 500 nodes (with tests going until a couple of thousand). And it wasn’t even my memory usage, the algorithm itself took too long. Even after I had optimised it a bit, it was still too slow.
I went back to the drawing board and thought whether the longest path might be calculated more easily because of the nature of the graph. And then I realised, if you just construct a tree with an arbitrary root node n, we can just calculate the max depth of all the children. If we take the 2 children with the maximum depth and add the depths, we’ll get the cost of the longest path.
The cost of the ideal tree is then simply (cost / 2 + cost % 2) or ceil(cost / 2.0)
Code source here
Normalized cuts and image segmentation.
論文100本ノック 1本目
Shi, J., & Malik, J. (2000). Normalized cuts and image segmentation. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 22(8), 888-905.
Ref: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=868688
Abstract
local features→global impressionを重視した手法,グラフ分割問題においてNormalized Cutというグループ間の非類似性、グループ内の類似性の両方を評価可能な尺度の提案。一般化固有値問題を用いてNomalized Cut を最適化する。画像、動画のフレーム間に適応した結果を提示する。
Summary
1925年 Wertheimer[24]らが部分認知と統合には 類似性・近接性・連続性が重要だと提唱。しかし認知グルーピングは計算的問題が多数発見された、この論文では画像領域分割に注目し解決するフレームワークを提案する。 1. 画像を部分集合として分けれたとして、果たしてどれが正しいのだろうか? Baysian は事前情報を適用することで適切な結果は得ることができるが、 事前情報(Low : blightness,color,texture Mid,High: Symmetric, Object model )をどのように解釈するかが難しい。 2. 部分領域は本質的に階層的な構成。単純な分割ではなく階層構造を意識して分割が必要になる。
dendgram : クラスタの階層構造を木構造により表現。 https://www.wikiwand.com/en/Dendrogram
1970年代、 マルコフランダム領域(MRF)[10]や多数のアプローチが提唱。 効果的に計算するためにどうするか?以前は近傍のものしか見ていない、または木構造の最小部分などに注目し計算量を抑えていた。 このアプローチではdendgram等を用いず、データのグラフからグラフ特性を解析して画像領域分割を行う。
Comments
この論文は実験比較が秀逸。
Spectral Clusteringを扱った論文は山のようにあるが、Spectral Clustering VS K-means などのようにバナナとシチューどっちが美味い?などのように実験デザインが不明瞭な論文が多い。しかしこの論文の実験比較はグラフ分割問題において固有値問題で最適化を行った手法を3つ挙げた上で類似手法の比較を行っていて、類似手法の中でもNCutがどのように優れているのかが分かった。(正確にはクラスタリングの比較ではなく、データの固有値空間への写像の比較)
特にNCutはグラフ構造の中でも正規化した尺度を提案する事により、グラフの切れ目とグラフの部分集合をバランスよく選択できるモデリングがなされているって事がわかって良い。 また画像からグラフを使ってマイニングする際にも、前処理(グラフの構築方法)も重要なことで、その点についての比較も行っている。
途中の式変形はどうやって思いついたのか是非聞いてみたい。
Fix: Best algorithm for detecting cycles in a directed graph #fix #development #programming
Fix: Best algorithm for detecting cycles in a directed graph #fix #development #programming
Best algorithm for detecting cycles in a directed graph
What is the most efficient algorithm for detecting all cycles within a directed graph?
I have a directed graph representing a schedule of jobs that need to be executed, a job being a node and a dependency being an edge. I need to detect the error case of a cycle within this graph leading to cyclic dependencies.
Answer [by Ajay Garg]: Best…
View On WordPress
Fixed: How can I find the shortest path between 100 moving targets? (Live demo included.) #answer #development #it
Fixed: How can I find the shortest path between 100 moving targets? (Live demo included.) #answer #development #it
How can I find the shortest path between 100 moving targets? (Live demo included.) Background
This picture illustrates the problem:
I can control the red circle. The targets are the blue triangles. The black arrows indicate the direction that the targets will move.
I want to collect all targets in the minimum number of steps.
Each turn I must move 1 step either left/right/up or down.
Each turn…
View On WordPress
Hi! I'm new-ish to tumblrdramaland and found my way to your blog via the Crazy for Kdrama podcast. May seem super random, but wondered if there were any blogs you might consider a must follow (especially of the pro Misaeng variety)?
Ooh, it’s so fun to hear from our podcast listeners! Kdrama Tumblrs, huh? I've got a lot of those, so let me see what I can pull together for you.
obsessivedilettante is good. She’s recapping Misaeng for Dramabeans, so you’ll get Misaeng love, along with a bunch of other great Kdrama and Kpop commentary and gifs. As a bonus, her non-K stuff is great, too.
feministkdramafeels have a lot of thought-provoking things to say about women in Kdrama, and there’s some very good Misaeng commentary here as well.
dramarathon has good commentary on Misaeng, among other dramas.
--Okay, I wanted to do a whole in-depth post here, but I’m running short on time to research and comment on all my favorite Tumblrs, so here’s a list, in no particular order, of my go-to blogs — the ones I follow in my feed reader, not just on my Tumblr dash, so I don’t miss anything.--
audreyskdramablog
andtheyfightcrime
outside-seoul
merdeandmore
Hope this helps you start your Tumblr journey with a bang — or at least pulls you down the rabbit hole that is the Tumblr Kdrama fandom. :)