Giter VIP home page Giter VIP logo

iistthesis's People

Contributors

4sarathbabu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

iistthesis's Issues

Problem in adding algorithms

Hi,
I am using Texmaker 4.4.1 in Ubuntu 16.04 for my report and I am facing some problem in adding an algorithm. I have written the following code for the algorithm in chapter2.tex:

`\begin{algorithm}[H]
\label{alg:Algo}
\textbf{Input:}{ G = (V, E), BS, E}
\textbf{Output:}{ a balanced tree T to achieve minimum convergecast period}
\textbf{Ensure:}{S $\cup$ {BS} are in a single connected component of G}

\begin{algorithmic}[1]
\State{B $\leftarrow$ one hop neighbours of BS }
\State{T $\leftarrow$ {BS} $\cup$ B}
\State{F $\leftarrow$ sensor nodes not in T}
\State{$\forall$ b $\in$ B, W(b) $\gets$ number of sensors in b}
\State{$\forall$ i $\in$ F, Dist(i) $\gets$ shortest path length from i to BS}
\While{$|F| > 0$}
\State{n $\gets$ sensor in F with smallest Dist}
\State{Connect n to b for which W(b)+1 is minimum}
\State{Break ties, if any, randomly}
\State{Update W(b), F and Dist}
\EndWhile
\State{Remove branches b from T with W(b)=0}
\end{algorithmic}

\end{algorithm}`

I have also included the commands \usepackage{float} , \usepackage{algorithm} , \usepackage{algpseudocode} and \usepackage{algorithmicx} in the doct.tex file. When I build the file using the 'Run' button in Texmaker I get the following 2 errors as seen in the 'Message' Panel:

/usr/share/texlive/texmf-dist/tex/latex/algorithms/algorithm.sty Error line 97 ! LaTeX Error: Command \listofalgorithms already defined.

chapter2.tex Error line 34 ! Missing number, treated as zero.<to be read again>\ALG@b@2@EndWhile@0 \EndWhile

image

To make sure that the error is not coming from my algorithm code i used the same packages and same code in a separate beamer document and there the code ran as desired.
image

Please tell me if i am doing something wrong or missing something in order to correct this error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.