Questions tagged [cycle]

A cycle is a process or series of items, which repeats several times.

Cycle is processes or events, which repeat several times. Number of repetitions can be known before starting the cycle or cycle can be repeated until some condition is true.

1551 questions
4
votes
1 answer

Finding a long vertex-disjoint cycle in a graph

I have a directed graph with 562 vertices and 3961 edges (the edges are http://a3nm.net/share/raw_graph_284374.txt if you are curious) and I would like to find a cycle in this graph which does not go twice through the same vertex and is as long as…
a3nm
  • 8,717
  • 6
  • 31
  • 39
4
votes
1 answer

Cycle through children

Basically, is there a way to 'cycle' through child elements. i.e.:
  • some text
  • some more text
  • even more text
I want to get the text from the first
  • , perform a few operations, then move on to the next one and…
  • user372743
    4
    votes
    1 answer

    Determining if a graph has a cycle without using DFS

    I came around one of those questions in my exams: Topologocial sorting using Kahn's Algorithm requires the graph to be DAG (Directed Acyclic Graph). How can we determine if a graph contains no cycles without using DFS/BFS first? I am trying…
    Theocharis K.
    • 1,281
    • 1
    • 16
    • 43
    4
    votes
    2 answers

    C++: Fast algorithm for finding minimum sum of cycle edges

    I have an undirected weighted graph and want to find the minimum sum of all cycles edges. That means if I have no cycle, the answer is 0. If I have one cycle the answer is the minimum edge weight of that cycle. And if I have more than one cycle it's…
    Timotheus
    • 111
    • 7
    4
    votes
    5 answers

    Iterate through a List Multiple times Cyclically starting from the Matching Index

    I need to do the following in python. I have a list of strings, list, a string to search for, text, and variable containing the number of elements to print, x. I want to iterate through x no. of consecutive elements of the list, wrapping around to…
    luke
    • 59
    • 1
    • 1
    • 7
    4
    votes
    2 answers

    Is it a way to know index using itertools.cycle()?

    I need to loop trough a list and come back to first element when last item is reached. The cycle object from itertools is designed for this. myList = [1,2,3,4,5,6,7,8,9] i = 0 for item in cycle(myList): index = i%9 print (index) i +=…
    Delgan
    • 18,571
    • 11
    • 90
    • 141
    4
    votes
    1 answer

    Faster cycle detection in a Directed Acyclic Graph?

    I have a program in Ruby 1.9.3 that constructs a RubyTree. My data is best described as being a Directed Acyclic Graph (DAG); please note that it is not a polytree. Well, at least the data should be a DAG, despite users' best efforts to foil my…
    allquixotic
    • 1,481
    • 2
    • 18
    • 37
    4
    votes
    1 answer

    Instruction less than one clock cycle

    I sometimes read that there are instructions which take less than a clock cycle - how is this possible? Or is this the value when pipelining and out-of-order comes in the game?
    HelloWorld
    • 2,392
    • 3
    • 31
    • 68
    4
    votes
    3 answers

    JQUERY CYCLE - Can I add page links to anchors assigned to Cycle's pager?

    Seems I've outdone myself. All the while I was creating this pretty little 'latest news' widget that fades on mouseover of each anchor. Then my colleague says, "Hey, Chris, these links don't work" ...oops. I would like to find out if I can have…
    4
    votes
    1 answer

    Jquery Cycle Div as Anchor

    I'm building a page that has a few divs of content that will slide in and out - just a few lines of code with jQuery Cycle. I have a navigation on the side in which I want to append the links to. No problem with Jquery cycle - I can even specify an…
    wesbos
    • 25,839
    • 30
    • 106
    • 143
    4
    votes
    2 answers

    Algorithm for finding all cycles in a directed graph on C++ using Adjacency matrix

    Given graph adjacency matrix (for ex. g[][]), graph is directed. Needs find count of all graph cycles (if exists) and print them. I tried to wrote this algorithm in Java, sometimes it works correctly. If graph has complex cycles, algorithm return…
    Pavel Belov
    • 41
    • 1
    • 3
    4
    votes
    1 answer

    vhdl-fsm with timer- clock cycle delay

    i have to write in vhdl an FSM with timer. I think that,there is no need you to get tired of understanding what my circuit will do. I just wanted to help me with this: Every change from a state to another state, there is one (or more) clock cycle…
    maria
    • 467
    • 1
    • 5
    • 19
    4
    votes
    4 answers

    Jquery cycle - center divs

    I am trying to keep divs with text that are on a cycle, centered within the parent element. This works fine when there is only one quote div. Once I have more than one and they are cycling, they appear left…
    user1110562
    • 393
    • 1
    • 9
    • 29
    4
    votes
    1 answer

    Cycle in SQL query?

    I have query, where I call function StoreFlowsByDates select sum(a.beglocalamount+a.localamount) from StoreFlowsByDates(ib_encodedate(EXTRACT(YEAR FROM CURRENT_DATE),1 ,1), ib_encodedate(EXTRACT(YEAR FROM CURRENT_DATE), 12 ,31), '', '', '', '',…
    Sk1X1
    • 1,305
    • 5
    • 22
    • 50
    4
    votes
    3 answers

    what is the difference between Cycle and circuit

    I have confusion that what is the differnce between the two ? Cycle and circuit so please make me sure by diagrams if possible. what i have in mind is that the cycle is always in undirected graph the circuit is always a directed graph. please…
    Sss
    • 1,519
    • 8
    • 37
    • 67