theory – DFA that accepts all the strings with exactly two a’s and more than two b’s

Thanks for contributing an answer to Computer Science Stack Exchange!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, see our tips on writing great answers.

Strings in python

How to find a specified letter follows an another letter or not.
the input is : ‘hi, how are you?’,’h’,’i’
then the output is true, because i followed by h at least one time .

How mark lines between two strings using regular expressions option in Notepad ++?

I am trying simply mark and replace all the lines in in Notepad++ file enclosed by two words e.g. DoorA & DoorB?

Thanks and appreciate your support in advance,

What is the time complexity of sorting n words length wise and then alphabetically? Should we consider the length of the strings in the complexity?

Let’s assume I have a list of some words found in the English dictionary:
(“hat”, “assume”, “prepare”, “cat”, “ball”, “brave”, “help” …. )

I want to sort these words (which are n in number) in a way, such that they are ordered based on their length, but if 2 words have the same length, they are ordered alphabetically.

What is the time complexity of this sorting operation?

Would it be fair to say that the complexity is just O(nlogn) and not take into consideration the length of the strings? If the largest length is S, can the complexity also involve a factor of S?

licensing – Is extracting strings from an executable considered decompilation?

I am attempting to parse all possible outputs of a proprietary piece of software (ELF binary) whose license explicitly forbids reverse-engineering, decompilation and disassembly.

So my question is: Could calling strings on the executable in question to list all embedded format-strings possibly be considered reverse-engineering, decompilation or disassembly?

I would doubt it, since strings is supposed to only scan the non-executable part of a binary, but wanted to ask anyways to be somewhat sure.

Construct a dfa and nfa for a set of strings on{0,1} : the left most symbol differs from the right most one and odd length string

Construct dfa and nfa for a set of string 0,1 such that left most and right most element are different and odd length string
Can you plss draw it

sorting – How do you reorder a sublist of strings, within a list?

I have a list that looks like this:

d= {{{"A5","I4","A2"}, {"A4","I5","A5"}}, 
    {{"A2","A5","I4"}, {"A5","I5","A4"}}, 
    {{"A2","A5","I4"}, {"A5","I4","A4"}}, 

How would I take list “d” and reorder the sublists so that they’re all in the format of:


The output I’m looking for would be:


Although some of the sublists in d are already in the correct form, I’m trying to find a generic way to put all of the sublists into that correct form.

android – Como puedo devolver desde un módulo nativo una array de Strings?

estoy tratando de montar una aplicación con react nativo, la cual se compone de dos partes principales. En primer lugar, la parte en java, la cual lee un csv y genera una Array con los nombres de las personas que se encuentran en este documento y en segundo lugar la parte de react, la cual, entre otras cosas, es un listado que debe mostrar los nombres de estas personas.

Método java:

public void readCSV(Promise promise) {
    AssetManager assetManager = getReactApplicationContext().getAssets();

    try {
        InputStream inputStream ="test.csv");
        CSVReader reader = new CSVReader(new InputStreamReader(inputStream));
        CSVIterator iterator = new CSVIterator(reader);
        ArrayList<String> pacients = new ArrayList<String>();
        ArrayList<String> startTimes = new ArrayList<String>();

        String() iter;

        while((iter = reader.readNext()) != null) {


        this.pacientes = pacients.toArray(new String(0));
        //readablePacientes = (ReadableArray) pacients;
        this.tiempoInicio = startTimes.toArray(new String(0));

        this.test = true;
    catch (FileNotFoundException e) {
    catch (IOException e) {

Método JS:

const getPacientes = async () => {

var listado = ()
var resObtenidos = ()
resObtenidos = await ListaPacientesModulo.readCSV()

//Aquí se iterará a traves de los resultados obtenidos y se crearán los objetos que se guardarán en el listado

return listado

He estado siguiendo la guía oficial de react native, y he visto que los tipos de datos que se pueden devolver están bastante limitados (enlace) por eso he estado probando a utilizar las Promise pero parece ser que no termino de entender como funcionan, porque me da el error “Cannot convert argument of type class LJava.lang.String;”.

Podría alguien explicarme como solucionar esto? Muchas gracias

turing machines – Can an $NDTM$ simultaneously perform a set of operations on all strings of a given length?

Can an $NDTM$ perform a set of operations on all strings of a given length $b$, at the same time? Aka can it operate on all strings of a given length by doing something like: spawn $2^b$ branches then operate on each string of length b on each branch?

How could it do this tho if the branches can’t communicate? That’s what I’m having a hard time with. How does any given branch, if it doesn’t know what strings the other branches are running, know what string to run the operations on (so that all the strings are covered by $2^b$ branches)?

strings – Is there any guideline from Unicode on how to deal with graphemes that have no base character?

A valid sequence of code-points can begin with one or more combining mark, which form a grapheme cluster that has no base glyph.

I’m unsure how that should be handled, if at all.

For example, consider a string consisting solely of an accent, with no “letter” attached. Is that grapheme cluster valid? should it be “sanitized” somehow, for example by prefixing it with a U+FFFD?

More specifically, I am worried about handling string concatenation. If I append that “string consisting solely in an accent” to another string, not necessarily I want the accent to be part of the other string’s last grapheme.

Does Unicode specify anything about how to handle these cases?