How can we write algorithm for interactive systems?












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
























  • What else it could be?
    – Heisenberg
    2 hours ago










  • 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
    2 hours ago










  • 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
    2 hours ago






  • 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
    1 hour ago






  • 1




    @Heisenberg, your code does not compile.
    – Sigur
    41 mins ago
















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
























  • What else it could be?
    – Heisenberg
    2 hours ago










  • 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
    2 hours ago










  • 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
    2 hours ago






  • 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
    1 hour ago






  • 1




    @Heisenberg, your code does not compile.
    – Sigur
    41 mins ago














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 54 mins ago







Heisenberg

















asked 2 hours ago









HeisenbergHeisenberg

93




93












  • What else it could be?
    – Heisenberg
    2 hours ago










  • 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
    2 hours ago










  • 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
    2 hours ago






  • 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
    1 hour ago






  • 1




    @Heisenberg, your code does not compile.
    – Sigur
    41 mins ago


















  • What else it could be?
    – Heisenberg
    2 hours ago










  • 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
    2 hours ago










  • 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
    2 hours ago






  • 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
    1 hour ago






  • 1




    @Heisenberg, your code does not compile.
    – Sigur
    41 mins ago
















What else it could be?
– Heisenberg
2 hours ago




What else it could be?
– Heisenberg
2 hours ago












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
2 hours ago




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
2 hours ago












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
2 hours ago




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
2 hours ago




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
1 hour ago




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
1 hour ago




1




1




@Heisenberg, your code does not compile.
– Sigur
41 mins ago




@Heisenberg, your code does not compile.
– Sigur
41 mins ago










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469462%2fhow-can-we-write-algorithm-for-interactive-systems%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX 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.


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





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.


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




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f469462%2fhow-can-we-write-algorithm-for-interactive-systems%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Lallio

Unable to find Lightning Node

Futebolista