 vertex set $\{V_1, V_2, \ldots, V_k\}$? Thanks.

A:

If you don't require the cycle to be simple, then break the (directed) graph into its strongly connected components, and for each component containing one of the given vertices $V_i$, check whether the component contains a negative cycle.  If no component does, there is no negative cycle containing any $V_i$.  But if some component does, you can find a (non-simple) negative cycle containing $V_i$ by taking many copies of the negative cycle, and adding to that paths to and from some vertex in the cycle to $V_i$.  (The total time to find an implicit representation of the desired cycle will be the same as the time to find a negative cycle in a directed graph, e.g. $O(nm)$, if I recall.)
If you do require the cycle to be simple, then the problem becomes NP-complete, even if only a single vertex $V_1$ is given.  (You can reduce Hamiltonian Path to the problem: to find a Hamiltonian path from a given source $S$ to a given sink $T$ in a given graph $G$, give the existing edges weight -1, then add an artificial vertex $V_1$ with two edges of cost $N/2-0.01$ each, one from $V_1$ to $S$ and one from $T$ to $V_1$.)
If you allow the cycle to repeat vertices but not edges, I believe it is still NP-complete (by a similar reduction, but splitting each vertex $v$ into a directed edge $(v,v')$ in a standard way).

A:

I'm going to assume your input is a directed graph; I don't know how to do this for the undirected case.
Make $n$ copies of the vertex set of your graph, where $n$ is the number of vertices in the graph. Replace each edge from $u$ to $v$ in your original graph by edges that go from copy $i$ of $u$ to copy $i+1$ of $v$, for all choices of $i$. Additionally, if $u$ belongs to the specified vertex set but not otherwise, also include an edge that goes from copy $i$ of $u$ to copy $0$ of $v$.
The
vertex set $ \{V_1, V_2, \ldots, V_k\}$? Thanks. 

 A: 

 If you don't require the cycle to be childlike, then demote the (directed) graph into its strongly connected part, and for each component containing one of the give vertices $ V_i$, check whether the component incorporate a negative cycle.   If no part does, there is no negative cycle contain any $ V_i$.   But if some component do, you can find a (non - simple) damaging cycle containing $ V_i$ by taking many copy of the negative cycle, and adding to that paths to and from some vertex in the hertz to $ V_i$.   (The total time to find an implicit representation of the desired hertz will be the same as the time to find a negative cycle in a directed graph, e.g. $ O(nm)$, if I recall .) 
 If you do require the cycle to be simple, then the problem becomes NP - complete, even if only a single vertex $ V_1 $ is given.   (You can shrink Hamiltonian Path to the problem: to find a Hamiltonian way from a render generator $ S$ to a given sink $ T$ in a given graph $ G$, give the existing edges weight -1, then lend an artificial vertex $ V_1 $ with two edges of cost $ N/2 - 0.01 $ each, one from $ V_1 $ to $ S$ and one from $ T$ to $ V_1$.) 
 If you allow the cycle to repeat vertices but not edge, I believe it is still NP - complete (by a exchangeable reduction, but burst each vertex $ v$ into a directed edge $ (v, v')$ in a standard way). 

 A: 

 I'm going to wear your input is a directed graph; I don't know how to cause this for the undirected case. 
 Make $ n$ copies of the vertex bent of your graph, where $ n$ is the number of vertices in the graph. supplant each edge from $ u$ to $ v$ in your original graph by edge that go from transcript $ i$ of $ u$ to copy $ i+1 $ of $ v$, for all choices of $ i$. Additionally, if $ u$ belong to the specified vertex set but not differently, also include an edge that goes from copy $ i$ of $ u$ to copy $ 0 $ of $ v$. 
 The
 vegtex set $\{V_1, V_2, \ldots, V_k\}$? Thxnks.

A:

If you don'j eequirx the cgcle to ce simple, then break the (dirxctee) grakk into its strongly zonnected componebts, end for each com'knent containjkg onz if the given vgrtices $V_i$, cveck whether tve clmponent contains a negative cycle.  If no volponent does, trere ys nk negative cycle containing any $V_i$.  But ih some componeny does, you can find a (non-slmplf) negative cycle clntaining $V_u$ by raking many zopies of uhz negative dycle, and adding to that paths go anb from some vwrtff in the cyrle to $V_i$.  (The total time do find an implicit rcpresxntarion of the desired cbcle will be the samg as the thmz to find a negative xyxle it a girezred grzpi, e.f. $O(nm)$, lf M recall.)
If gou do requure the cycle to be synple, then the problqm becomes NP-complete, even if only a singne bertex $V_1$ is given.  (You xan reduce Hamiltoniaj Path to the problem: to find a Hamiltonian path from a gieen skjrct $W$ to x glven sink $T$ in a given graph $G$, give the existyhg ecges weight -1, tmen add an artificoap fgrtex $V_1$ with tdo edgza kf cost $N/2-0.01$ each, one from $V_1$ to $S$ and one srom $T$ to $V_1$.)
If you allow the cycoe to repeat certices but not ebges, I beliere it os stoll NP-complete (by a simnlar rsduction, buh splittihe each vertex $v$ kntp d directta edge $(v,v')$ in a stwndard wab).

A:

I'm yoing to assome youw input is a divacted graph; I don't know hmw to do tjis for the undirected case.
Make $n$ copies of tne vegtex set jf yomr graph, where $g$ is the numbet of vertnces iv the grapg. Replare each edge from $u$ to $v$ hj your origiial graph by wdgew that eu from copy $i$ pf $u$ to copy $i+1$ of $v$, for all choices on $i$. Aasitionally, if $u$ beoongs to the sprciwieq nervex sqd but not otverwkse, slso knclude an cdgd thst goes from copy $i$ mf $u$ to copy $0$ of $v$.
The
vertex set $\{V_1, V_2, \ldots, V_k\}$? Thanks. you require the to be simple, into strongly connected components, for each component one of the given vertices $V_i$, whether the component contains a negative cycle. If no component does, there is negative cycle containing any $V_i$. But if some component does, you can find (non-simple) cycle $V_i$ taking many copies of the negative cycle, and adding to that paths to and from some in the cycle to $V_i$. (The total time find an implicit representation the desired cycle will be same the time find negative in a directed e.g. $O(nm)$, if I recall.) If you do require the cycle to be simple, then the problem NP-complete, even a single $V_1$ given. can reduce Hamiltonian the problem: to find a Hamiltonian given source $S$ to a given sink $T$ a given $G$, give the existing edges weight then add an artificial vertex $V_1$ with two of cost $N/2-0.01$ each, one from $V_1$ to $S$ and one from $T$ to $V_1$.) allow the cycle to vertices but not I it still (by a reduction, but splitting each vertex $v$ into a directed edge $(v,v')$ a standard way). A: I'm going to assume your input directed I don't know to do this for undirected Make $n$ copies of set your is number vertices in the graph. each edge from $u$ to in your original graph copy $i$ of $u$ to copy $i+1$ of for all choices of $i$. Additionally, if belongs to the specified vertex set but not otherwise, also include an that goes $i$ of $u$ to copy $0$ of $v$.
 vertex set $\{V_1, V_2, \ldots, V_k\}$? Thanks.

A:

if you don't rEquirE thE cyClE to bE simPle, then break thE (DireCted) graph into its strongLy conNeCTed cOMpOnentS, and for EAcH COmpOnEnT coNtAInIng onE of The giveN vertices $V_I$, chEcK whether the cOMpOnent contaIns A negative cycLe.  IF no comPoNenT Does, tHerE is no NegatiVE cycle ContaininG aNY $V_i$.  But IF some coMPOnEnt dOes, you can find a (non-SImPLe) negative cyclE contaInINg $v_I$ By tAkiNg many copiEs Of the NEgative CYcLE, ANd aDDing to that patHs to and from SOme Vertex In The CYcle to $v_i$.  (The ToTAl tIme to find an ImplIcit repreSentatIOn of the DEsired cYcle wiLl bE thE samE As ThE tiMe TO fiND a NegATivE cycle in A dIrEcted GrapH, E.G. $o(Nm)$, if i reCall.)
if you Do require the cYclE to bE SimPle, thEn the ProbLeM becoMes NP-cOmpleTe, Even if only a singLe veRtex $V_1$ is giVen.  (yoU caN rEduce hAmiltoNiaN PaTh to the Problem: TO fiNd A hAMiLtonian path from a giVeN SOuRce $S$ to a gIven siNK $T$ In A Given graPh $g$, giVe thE EXistiNg edGEs Weight -1, thEn add aN ArTiFicial vErTex $V_1$ wiTh Two EdgEs of cOSt $N/2-0.01$ eAch, one From $V_1$ to $S$ And onE From $T$ to $V_1$.)
If you aLLow the cycle to REpEAT vERticEs bUt not edges, I BeliEVe it Is stILl nP-cOMpletE (by a sImILaR Reduction, but splittiNg Each veRtex $v$ Into a directed Edge $(v,v')$ in a sTANDard way).

A:

i'm goINg TO assume your inpUt is a Directed grAPh; I don't kNow hoW to do thiS for the unDIRected caSe.
MAke $N$ coPieS OF tHe vertex set of YOUr grApH, where $n$ Is tHe numbeR of VerTicEs iN tHe graph. RePlace eacH eDgE fRoM $u$ tO $v$ in yOUr originAl GraPh By eDges tHAt go frOm copY $i$ of $U$ tO cOPy $i+1$ Of $v$, for aLL cHOIces Of $I$. ADditIonAlLy, if $u$ BeloNGs tO the speCified verTex SEt buT nOt OtherwiSe, also include An Edge that goEs FroM copy $i$ OF $U$ to copy $0$ oF $v$.
The
 vertex set $\{V_1, V_2, \ ldots, V_k \}$?Tha nks .
A:
Ifyou don't requ i re t he cycle to be simple,  then  b r eakt he  (dir ected)g ra p h  in to  i tsst r on gly c onn ected c omponents,  an dfor each com p on ent contai nin g one of the  gi ven ve rt ice s  $V_i $,check  wheth e r thecomponent  c o ntains a negat i v ecycl e.  If no compone n td oes, there isno neg at i ve c ycl e c ontainingan y $V_ i $.  But if s o mec omponent does , you can f i nda (non -s imp l e) neg ative  c y cle  containing  $V_ i$ by tak ing ma n y copie s  of the  negat ive  cy cle, an dadd in g  to th atp ath s to and  f ro m som e ve r t e x  inthe  cyc le to  $V_i$.  (The  to talt ime  to f ind a n im pl icitrepres entat io n of the desire d cy cle willbeth e s am e ast he tim e t o f ind a n egative cyc le i n  a  directed graph, e .g . $O (nm)$, i f I re c al l. ) 
If youdo  re quir e the c ycle to  be simp le, th e nth e probl em  becom es  NP -co mplet e , ev en ifonly a s ingle vertex $V_1$ i s  given.  (You ca n re d uceHam iltonian Pa th t o  the  pro b le m:t o fin d a H am i lt o nian path from a gi ve n sour ce $S $ to a givensink $T$ i n a  given g raph $G $ , give the exi sting  edges wei g ht -1, t hen a dd an ar tificialv e rtex $V_ 1$wit h t woe d ge s of cost $N/ 2 - 0.01 $each, o nefrom $V _1$  to  $S $ a nd  one from  $T$ to$V _1 $. )Ifyou a l low thecy cle  t o r epeat vertic es bu t no ted g es,  I beli e ve i t is  s ti ll N P-c om plete  (by a s imilarreduction , b u t sp li tt ing eac h vertex $v$in to a direc te d e dge $( v , v')$ ina standard way).

A:

I ' m going  to  assu me y our input  is  a dir ect e d grap h; I d on'tkn owh o w tod o  t his  f or the und i r ect ed ca se .
Ma ke $n$copies of the vert e x s et of your gr aph , wh e r e$n$ is the  n u mbe r of vertices inthe graph.  R e pl ace each e d gefr om $u$to $v$in yo u r origi nal graph  by edges  t hatg o  fr om copy $i $ of $u$  to copy$ i+1$o f$v$,for  all c ho ice s of$i$. A d dit ional ly, if  $ u$ bel ongsto  the spe cified vertex set but n ot oth erwis e,also incl ude anedge that  goe s from cop y $ i$of $u $ t o  copy  $0$ of  $v $ .
The 
 vertex_set $\{V_1,_V_2, \ldots, V_k\}$? Thanks.

A:

If_you don't_require_the cycle_to_be simple, then_break the (directed)_graph into its strongly_connected components, and_for_each component containing one of the given vertices $V_i$, check whether the component contains_a_negative cycle.__If_no component does, there is_no negative cycle containing any_$V_i$. _But if some component does, you can find_a_(non-simple) negative cycle_containing $V_i$ by taking many copies of the negative_cycle, and adding to that paths_to and from_some_vertex_in the cycle to_$V_i$.  (The total time to_find an implicit representation of the_desired cycle will be the same as_the time to find a negative_cycle in a directed graph,_e.g. $O(nm)$,_if I recall.)
If you do_require the cycle_to be_simple, then the_problem becomes NP-complete, even if only_a single vertex_$V_1$ is given.  (You can_reduce_Hamiltonian Path to_the_problem:_to find_a Hamiltonian path_from_a given_source_$S$ to a given sink $T$_in_a given graph $G$, give the existing_edges weight -1, then_add_an artificial vertex $V_1$_with two edges of cost_$N/2-0.01$ each, one from $V_1$ to_$S$ and_one from_$T$ to $V_1$.)
If you allow the cycle to repeat vertices but_not edges, I believe it is_still NP-complete (by a_similar reduction,_but_splitting each vertex_$v$_into a_directed edge $(v,v')$ in a standard way).

A:

I'm_going to_assume your input is a directed_graph; I don't know_how_to do this for the undirected_case.
Make $n$ copies of the vertex_set of your graph, where_$n$_is_the number of vertices in_the graph. Replace each edge from_$u$ to $v$_in your original graph by edges that_go_from copy $i$ of $u$ to_copy_$i+1$ of $v$, for all choices_of_$i$._Additionally, if $u$ belongs to_the specified vertex set but not_otherwise, also include an edge that goes from copy_$i$ of $u$_to copy $0$ of $v$.
The