Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4244748
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:44:57+00:00 2026-05-21T03:44:57+00:00

The DFA must have the following four properties: The DFA has N nodes Each

  • 0

The DFA must have the following four properties:

  • The DFA has N nodes

  • Each node has 2 outgoing transitions.

  • Each node is reachable from every other node.

  • The DFA is chosen with perfectly uniform randomness from all possibilities

This is what I have so far:

  1. Start with a collection of N nodes.
  2. Choose a node that has not already been chosen.
  3. Connect its output to 2 other randomly selected nodes
  4. Label one transition 1 and the other transition 0.
  5. Go to 2, unless all nodes have been chosen.
  6. Determine if there is a node with no incoming connections.
  7. If so, steal an incoming connection from a node with more than 1 incoming connection.
  8. Go to 6, unless there are no nodes with no incoming connections

However, this is algorithm is not correct. Consider the graph where node 1 has its two connections going to node 2 (and vice versa), while node 3 has its two connection going to node 4 (and vice versa). That is something like:

1 <==> 2

3 <==> 4

Where, by <==> I mean two outgoing connections both ways (so a total of 4 connections). This seems to form 2 cliques, which means that not every state is reachable from every other state.

Does anyone know how to complete the algorithm? Or, does anyone know another algorithm? I seem to vaguely recall that a binary tree can be used to construct this, but I am not sure about that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:44:57+00:00Added an answer on May 21, 2026 at 3:44 am

    Strong connectivity is a difficult constraint. Let’s generate uniform random surjective transition functions and then test them with e.g. Tarjan’s linear-time SCC algorithm until we get one that’s strongly connected. This process has the right distribution, but it’s not clear that it’s efficient; my researcher’s intuition is that the limiting probability of strong connectivity is less than 1 but greater than 0, which would imply only O(1) iterations are necessary in expectation.

    Generating surjective transition functions is itself nontrivial. Unfortunately, without that constraint it is exponentially unlikely that every state has an incoming transition. Use the algorithm described in the answers to this question to sample a uniform random partition of {(1, a), (1, b), (2, a), (2, b), …, (N, a), (N, b)} with N parts. Permute the nodes randomly and assign them to parts.

    For example, let N = 3 and suppose that the random partition is

    {{(1, a), (2, a), (3, b)}, {(2, b)}, {(1, b), (3, a)}}.
    

    We choose a random permutation 2, 3, 1 and derive a transition function

    (1, a) |-> 2
    (1, b) |-> 1
    (2, a) |-> 2
    (2, b) |-> 3
    (3, a) |-> 1
    (3, b) |-> 2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good night, Let's suppose I have a class which implements a NFA/DFA whose transitions
I have a question about DFA minimization. So I've used very well known techniques
Let's say you have a data frame generated by the following commands: date <-
I have heard that DFA can be simulated by Loop and NFA can be
I have a compiler homework question that wants me to draw a DFA for
I'm working on some homework for my compiler class and I have the following
I have a DFA but I don't know whether it's accepting states. I only
I have a very peculiar problem:(not using web.config) DefaultFacebookApplication dfa=new DefaultFacebookApplication(); dfa.AppId = ...;
We have a running project in which client has asked to implement Google DoubleClick
I have the following data frame: > str(df) 'data.frame': 52 obs. of 3 variables:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.