Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

algorithm - How to find the minimum set of vertices in a Directed Graph such that all other vertices can be reached -


given directed graph, need find minimum set of vertices other vertices can reached.

so result of function should smallest number of vertices, other vertices can reached following directed edges.

the largest result possible if there no edges, nodes returned.

if there cycles in graph, each cycle, 1 node selected. not matter one, should consistent if algorithm run again.

i not sure there existing algorithm this? if have name? have tried doing research , closest thing seems finding mother vertex if algorithm, actual algorithm elaborated answer given in link kind of vague.

given have implement in javascript, preference .js library or javascript example code.

from understanding, finding connected components in graph. kosaraju's algorithm 1 of neatest approaches this. uses 2 depth first searches against later algorithms use one, simple concept.

edit: expand on that, minimum set of vertices found suggested in comments post : 1. find connected components of graph - reduce each component single vertex. 2. remaining graph dag (or set of dags if there disconnected components), root(s) of form required set of vertices.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -