How can we write algorithm for interactive systems? [closed]












0















I want to write an interactive algorithim using pseudocode package of LaTeX. In my algorithim basically there are two parties. I am using a loop and on each round of the loop one person requests the other one to supply him with something. How these kind of algorithim usually are written in pseudocode package? can you introduce me a paper or a piece of similar writting?



documentclass[a4paper]{article}

usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{graphicx}
usepackage[colorinlistoftodos]{todonotes}
usepackage{algorithm}
usepackage{algpseudocode}

usepackage{geometry}
geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
}

begin{document}
begin{algorithm}[H]
caption{Estimation of quantum mutual information.}
hspace*{algorithmicindent} textbf{Input:} \
hspace*{algorithmicindent}
textbf{Output:}\
bm{C}left[iright]
label{alg:alg}
begin{algorithmic}
Procedure{Estimation}
While{$epsilon_1>epsilon$}
For {$i$ from~$1$ to~$2n$}
State Alice receives the state~$rho$ from Bob
State $bm{C}left[iright]leftarrow rho *2$
EndFor
EndProcedure
end{algorithmic}
end{algorithm}
end{document}









share|improve this question















closed as off-topic by Werner, Sigur, Kurt, flav, marmot Jan 10 at 5:57


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Werner, Sigur, Kurt, flav, marmot

If this question can be reworded to fit the rules in the help center, please edit the question.














  • What else it could be?

    – Heisenberg
    Jan 10 at 0:22











  • Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

    – Werner
    Jan 10 at 0:29











  • No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

    – Heisenberg
    Jan 10 at 0:32






  • 1





    I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

    – Werner
    Jan 10 at 1:18






  • 1





    @Heisenberg, your code does not compile.

    – Sigur
    Jan 10 at 1:53
















0















I want to write an interactive algorithim using pseudocode package of LaTeX. In my algorithim basically there are two parties. I am using a loop and on each round of the loop one person requests the other one to supply him with something. How these kind of algorithim usually are written in pseudocode package? can you introduce me a paper or a piece of similar writting?



documentclass[a4paper]{article}

usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{graphicx}
usepackage[colorinlistoftodos]{todonotes}
usepackage{algorithm}
usepackage{algpseudocode}

usepackage{geometry}
geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
}

begin{document}
begin{algorithm}[H]
caption{Estimation of quantum mutual information.}
hspace*{algorithmicindent} textbf{Input:} \
hspace*{algorithmicindent}
textbf{Output:}\
bm{C}left[iright]
label{alg:alg}
begin{algorithmic}
Procedure{Estimation}
While{$epsilon_1>epsilon$}
For {$i$ from~$1$ to~$2n$}
State Alice receives the state~$rho$ from Bob
State $bm{C}left[iright]leftarrow rho *2$
EndFor
EndProcedure
end{algorithmic}
end{algorithm}
end{document}









share|improve this question















closed as off-topic by Werner, Sigur, Kurt, flav, marmot Jan 10 at 5:57


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Werner, Sigur, Kurt, flav, marmot

If this question can be reworded to fit the rules in the help center, please edit the question.














  • What else it could be?

    – Heisenberg
    Jan 10 at 0:22











  • Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

    – Werner
    Jan 10 at 0:29











  • No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

    – Heisenberg
    Jan 10 at 0:32






  • 1





    I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

    – Werner
    Jan 10 at 1:18






  • 1





    @Heisenberg, your code does not compile.

    – Sigur
    Jan 10 at 1:53














0












0








0








I want to write an interactive algorithim using pseudocode package of LaTeX. In my algorithim basically there are two parties. I am using a loop and on each round of the loop one person requests the other one to supply him with something. How these kind of algorithim usually are written in pseudocode package? can you introduce me a paper or a piece of similar writting?



documentclass[a4paper]{article}

usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{graphicx}
usepackage[colorinlistoftodos]{todonotes}
usepackage{algorithm}
usepackage{algpseudocode}

usepackage{geometry}
geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
}

begin{document}
begin{algorithm}[H]
caption{Estimation of quantum mutual information.}
hspace*{algorithmicindent} textbf{Input:} \
hspace*{algorithmicindent}
textbf{Output:}\
bm{C}left[iright]
label{alg:alg}
begin{algorithmic}
Procedure{Estimation}
While{$epsilon_1>epsilon$}
For {$i$ from~$1$ to~$2n$}
State Alice receives the state~$rho$ from Bob
State $bm{C}left[iright]leftarrow rho *2$
EndFor
EndProcedure
end{algorithmic}
end{algorithm}
end{document}









share|improve this question
















I want to write an interactive algorithim using pseudocode package of LaTeX. In my algorithim basically there are two parties. I am using a loop and on each round of the loop one person requests the other one to supply him with something. How these kind of algorithim usually are written in pseudocode package? can you introduce me a paper or a piece of similar writting?



documentclass[a4paper]{article}

usepackage[english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amsfonts}
usepackage{graphicx}
usepackage[colorinlistoftodos]{todonotes}
usepackage{algorithm}
usepackage{algpseudocode}

usepackage{geometry}
geometry{
a4paper,
total={210mm,297mm},
left=20mm,
right=20mm,
top=20mm,
bottom=20mm,
}

begin{document}
begin{algorithm}[H]
caption{Estimation of quantum mutual information.}
hspace*{algorithmicindent} textbf{Input:} \
hspace*{algorithmicindent}
textbf{Output:}\
bm{C}left[iright]
label{alg:alg}
begin{algorithmic}
Procedure{Estimation}
While{$epsilon_1>epsilon$}
For {$i$ from~$1$ to~$2n$}
State Alice receives the state~$rho$ from Bob
State $bm{C}left[iright]leftarrow rho *2$
EndFor
EndProcedure
end{algorithmic}
end{algorithm}
end{document}






algorithms algorithm2e algorithmicx algorithmic pseudocode






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 10 at 1:40







Heisenberg

















asked Jan 10 at 0:20









HeisenbergHeisenberg

93




93




closed as off-topic by Werner, Sigur, Kurt, flav, marmot Jan 10 at 5:57


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Werner, Sigur, Kurt, flav, marmot

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Werner, Sigur, Kurt, flav, marmot Jan 10 at 5:57


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Werner, Sigur, Kurt, flav, marmot

If this question can be reworded to fit the rules in the help center, please edit the question.













  • What else it could be?

    – Heisenberg
    Jan 10 at 0:22











  • Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

    – Werner
    Jan 10 at 0:29











  • No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

    – Heisenberg
    Jan 10 at 0:32






  • 1





    I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

    – Werner
    Jan 10 at 1:18






  • 1





    @Heisenberg, your code does not compile.

    – Sigur
    Jan 10 at 1:53



















  • What else it could be?

    – Heisenberg
    Jan 10 at 0:22











  • Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

    – Werner
    Jan 10 at 0:29











  • No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

    – Heisenberg
    Jan 10 at 0:32






  • 1





    I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

    – Werner
    Jan 10 at 1:18






  • 1





    @Heisenberg, your code does not compile.

    – Sigur
    Jan 10 at 1:53

















What else it could be?

– Heisenberg
Jan 10 at 0:22





What else it could be?

– Heisenberg
Jan 10 at 0:22













Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

– Werner
Jan 10 at 0:29





Terminology (of "interactive" algorithms) aside, you're mainly interested in pseudocode for a loop structure (like while or for or repeat or until, ...), right?

– Werner
Jan 10 at 0:29













No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

– Heisenberg
Jan 10 at 0:32





No, I know how to use loop and etc. I dont know whats the formal way of writting an intractive algoritim in latex? Usually an algorithim has an input and an output but here I need to make request in the middle of the procedure!

– Heisenberg
Jan 10 at 0:32




1




1





I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

– Werner
Jan 10 at 1:18





I think this question is both too broad and not specifically related to (La)TeX. Once you have settled on a way to write pseudocode for an interactive algorithm, you can write it up in (La)TeX and ask here again with (La)TeX-specific questions.

– Werner
Jan 10 at 1:18




1




1





@Heisenberg, your code does not compile.

– Sigur
Jan 10 at 1:53





@Heisenberg, your code does not compile.

– Sigur
Jan 10 at 1:53










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?