tag:blogger.com,1999:blog-31123417618613641042024-02-19T05:50:56.035+02:00Pantelis RodisComputer Science and ProgrammingPantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.comBlogger51125tag:blogger.com,1999:blog-3112341761861364104.post-61168460673527719052024-01-16T01:10:00.004+02:002024-01-29T00:28:29.672+02:00Can we use AI to solve NP-Hard problems efficiently?<p class="MsoNormal" style="text-align: justify;"><span class="rynqvb"><span lang="EN" style="mso-ansi-language: EN;">The growing research interest in Artificial Intelligence (AI) has led to
the development of a plethora of methods and techniques that address difficult computational
problems. The impressive progress on the field reasonably generates the
question of whether we could use AI methods in order to solve efficiently traditionally
hard problems or even to answer the NP vs P question.<o:p></o:p></span></span></p>
<p class="MsoNormal" style="text-align: justify;"><span lang="EN-US">These days
the discussion on the possible relation of AI and NP-hardness </span><span class="rynqvb"><span lang="EN">revolves around two
topics</span></span>.</p>
<p class="MsoNormal"></p><ul style="text-align: left;"><li style="text-align: justify;"><span lang="EN-US" style="mso-ansi-language: EN-US;">Whether AI
can resolve the NP vs P question</span></li><li style="text-align: justify;"><span lang="EN-US" style="mso-ansi-language: EN-US;">If NP=P this
will boost AI algorithms</span></li></ul><p></p>
<p class="MsoNormal" style="text-align: justify;"><span lang="EN-US" style="mso-ansi-language: EN-US;">On the
first topic and at the time that this post is written, AI does not exhibit </span><span class="rynqvb"><span lang="EN" style="mso-ansi-language: EN;">synthetic thinking</span></span>
so it is currently impossible to answer important problems as this. The second
is really doubtful any way.<span lang="EN-US" style="mso-ansi-language: EN-US;"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-align: justify;">Let’s
discuss a more practical aspect of the problem. AI methods deviate from
traditional deterministic algorithms and in many cases overcome inherent
obstacles of traditional computing. Then, could AI methods provide efficient
solutions for NP-Hard problems?</p>
<p class="MsoNormal" style="text-align: justify;"><span lang="EN-US" style="mso-ansi-language: EN-US;">There is
huge literature on AI assisted approximation methods on NP-Hard problems that provide
good and practical solutions for these problems sometimes achieving near
optimal solutions for really hard instances of NP-Hard problems. So why not use
them for actually solving them and provide exact solutions?<o:p></o:p></span></p>
<p class="MsoNormal" style="text-align: justify;">This
reasonable question actually raises even more problems. Unlike traditional
computing where Alan Turing solved the problem of modeling computation, AI
methods lack general modeling of their operation. For some Machine Learning
methods the researchers approach them experimentally and exhibit empirical
evidences for their robustness without solid theoretical foundations.</p>
<p class="MsoNormal" style="text-align: justify;"><span lang="EN-US" style="mso-ansi-language: EN-US;">The intense
research in these issues gradually fills some of these gaps. In section 4 of <a href="https://doi.org/10.1007/s10922-023-09771-y" rel="nofollow" target="_blank">our latest paper</a> </span>we provide
a modeling framework for the operation of Genetic Algorithms (GA). Then we prove
that GA may not solve efficiently classes of problems that include NP-Hard
problems in every case; while they are pretty efficient on solving problems in
P.</p>
<p class="MsoNormal" style="text-align: justify;">At least
for now, it seems that AI can provide fast and practical approximate solutions for hard
problems. But there is some pessimisms when we seek for exact solutions and
confront NP-Hardness.</p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-57234630433466838882023-09-05T16:43:00.005+03:002023-09-05T16:47:55.316+03:00Modeling and tuning genetic algorithms<p><span style="font-size: 14px;">Here is our <a href="Here is our latest work that presents a solution on the problem of Service Chain Embedding. It is based on genetic algorithms and extends a previously published conference paper. The interesting contribution of this paper is a modeling framework for the operation of genetic algorithms. Using this framework we prove that NP-hard problems are not computed efficiently by genetic algorithms and we define some properties for the problems that genetic algorithms compute efficiently. Another interesting contribution of this paper is a performance optimization mechanism for genetic algorithms which is also based on genetic computing. So you use one genetic algorithm in order to optimize the performance of another. https://doi.org/10.1007/s10922-023-09771-y" target="_blank">latest work</a> that presents a solution on the problem of Service Chain Embedding. It is based on genetic algorithms and extends a previously published conference paper.</span></p><div><div><span style="font-size: 14px;"><div><br /></div><div>The interesting contribution of this paper is a modeling framework for the operation of genetic algorithms. Using this framework we prove that NP-hard problems are not computed efficiently by genetic algorithms and we define some properties for the problems that genetic algorithms compute efficiently. </div><div><br /></div><div>Another interesting contribution of this paper is a performance optimization mechanism for genetic algorithms which is also based on genetic computing. So you use one genetic algorithm in order to optimize the performance of another.</div><div><br /></div><div><a href="https://doi.org/10.1007/s10922-023-09771-y" target="_blank">https://doi.org/10.1007/s10922-023-09771-y</a></div></span></div><div><span style="background-color: white; font-size: 14px;"><span color="rgba(0, 0, 0, 0.9)" face="-apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Fira Sans, Ubuntu, Oxygen, Oxygen Sans, Cantarell, Droid Sans, Apple Color Emoji, Segoe UI Emoji, Segoe UI Emoji, Segoe UI Symbol, Lucida Grande, Helvetica, Arial, sans-serif"><br /></span></span></div></div>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-20883737699528173192023-09-03T13:14:00.008+03:002023-09-03T13:18:45.105+03:00Distributed Unsupervised Deep Learning<p style="text-align: justify;">Our recently published paper, available <a href="https://doi.org/10.1109/ACCESS.2023.3308492">here</a> in open access mode, presents a deep learning method for network resource orchestration. There are a few features that make this method interesting.</p><p style="text-align: justify;">It is build on a distributed multi-agent architecture.</p><p style="text-align: justify;">It is based on Unsupervised Deep Learning, not a common feature for resource orchestration methods. The user essentially defines an objective and the agents try to accomplish it by training and then running deep neural networks and without further interaction with the user.</p><p style="text-align: justify;">The agents share among them the most efficient models making the training process more efficient.<br /></p><p style="text-align: justify;">The neural networks are trained using genetic algorithms which is an innovative feature for unsupervised learning systems and speeds up the training procedure. It is actually interesting to use one system in order to train another system without explicitly describing the training process.<br /></p><p style="text-align: justify;">We are able to test this method by running simulations in large scale topologies. For this we have built an efficient network simulator resealed as an open source project.<br /></p><p style="text-align: left;"><br /></p><p><a href="https://doi.org/10.1109/ACCESS.2023.3308492" target="_blank">https://doi.org/10.1109/ACCESS.2023.3308492</a></p><p><br /></p><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqgkivYR1Rji8UymslYRIMSxO78Bzu6njnwrAZVopyBvvu8ikLdgjDL8K54E5JwCB963yaJiip7SwsOp0nKSFhEFmIxoXu1q6rrj-wMrlSD5SWfR8JUXP2sbIXE-jMGzoKDpZEg_BLJKEPHirzUGOq9av7HEcrhBStoLb7uNaLTBLOpHxPXGIBZ4ZX/s660/Graphical_Abstract.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="292" data-original-width="660" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqgkivYR1Rji8UymslYRIMSxO78Bzu6njnwrAZVopyBvvu8ikLdgjDL8K54E5JwCB963yaJiip7SwsOp0nKSFhEFmIxoXu1q6rrj-wMrlSD5SWfR8JUXP2sbIXE-jMGzoKDpZEg_BLJKEPHirzUGOq9av7HEcrhBStoLb7uNaLTBLOpHxPXGIBZ4ZX/w400-h177/Graphical_Abstract.jpg" width="400" /></a></div><br /><p><br /></p><p> <br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-26726880095103607862023-08-23T18:01:00.005+03:002023-08-24T10:21:06.479+03:00An application for reading BIG filesThere are many times that I want to read a big text file but current text viewers cannot handle it. <div>So I decided to develop an application that would put me out of this trouble. </div><div>It is open source and reseased in this repository<div><br /></div><div><a href="https://github.com/rodispantelis/tools" target="_blank">https://github.com/rodispantelis/tools</a></div></div>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-30825062221687452412023-03-29T22:29:00.002+03:002023-03-29T22:32:35.270+03:00On the Creative AI rush<p>It is weird how people react these days about Creative AI, especially ChatGPT. It was released a few months ago and many people already have developed an addiction on it while many others hate it or are afraid of it passionately.</p><p>How can serious professionals depend on a chat bot on their daily work? From my perspective they are either not serious or not professionals. Using such a great tool is reasonable but suddenly to depend on it out of the blue is not rational. When the service stopped a few days ago some people were panicked. Really???</p><p>It is actually a great tool and has many programming potentials. The statement that these capabilities will some day signal the end of programming is not accurate. Trivial programming has passed away long ago. There are many tools and websites that actually help you build applications in seconds, it is not only chatGPT. But really innovative programming cannot be created by such chat bots that only use the knowledge that they have from their training and cannot, at least yet, create knowledge and science.</p><p>About the fear on the use of AI. Well, as any other technological achievement it can be used for the good or the bad, for the best or the worst of humanity. You can use a knife to cook or kill, on the same spirit you can use AI to detect and treat cancer or manipulate the elections.</p><p><br /></p><p><br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-67583100270834399422023-02-10T18:39:00.006+02:002023-02-12T00:43:03.348+02:00About chatGPT<p style="text-align: justify;">These days the talk of the town is ChatGPT and its potential uses. It really is a great tool and it impressed me, and everybody else, with the way it responds to simple language questions.<br />
Of course it has some flaws. There is some criticism about its math capabilities or the accuracy of some information it provides, like historical dates and paper citations. But this doesn't really bother me; if I wanted math calculations I would use a calculator and for dates and historical events I would prefer Wikipedia. There are more fundamental concerns about the use of chatGPT, especially about its potential use in research as many people claim (or fear) that generative AI could replace original research. Well, not yet.<br />
The current model of chatGPT doesn't have critical "thinking" and has troubles on reasoning and induction. I asked it some questions about how certain AI methods could be combined on an innovative way, like genetic algorithms and unsupervised learning. As there are no references of such combinations, chatGPT discouraged this idea. I would expect an answer that would reason for or against this idea based on the features of these two methods.<br />
Then I thought of asking a stupid and easy question, but it still failed. The question was why my favourite football team cannot win Champions League. The obvious question is that it is a weak team and cannot face the competition. But the model responded that it's just a language model and cannot answer. I had to guide it through some more questions to make it answer correctly.<br />
The cause for these weaknesses must be the architecture of the model. Probably more interconnections among the layers of the model will improve its ability to reason and combine previous knowledge. But this is more of future goal, currently it cannot replace original research and we should probably cross check its quite interesting answers. </p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-86123552955306111962022-11-01T00:28:00.008+02:002022-11-02T22:17:28.876+02:00Java programming is environmental friendly I recently came across this <a href="https://repositorio.inesctec.pt/bitstream/123456789/5492/1/P-00N-4CX.pdf" target="_blank">paper</a>, which provides experimental evidence that show that programming with different languages has different environmental footprint. It is reasonable to say that this is true, although I really believe that no one has every consider this while programming. <div>The good news is that I don't have to give up my Java habits, as Java has a good environmental footprint. Also I can find in this study one more excuse to avoid Python, it has a bad environmental footprint.</div><div>Of course Python is great but old habits die hard.</div>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-40007520663141539382022-08-26T23:44:00.001+03:002022-09-08T00:18:13.530+03:00On the order of executing genetic procedures <p>The classical approach on genetic algorithm design is to generate an initial population and then in every generation to execute Selection, Crossover and then Mutation; in that particular order. I often place Selection last, after Crossover and Mutation. There are pretty good reasons for following any of the two approaches and the answer to the question of which forms the best strategy is as usually case dependant.</p><p>By placing Selection first in order, you actually make a cleaning of the population from weak solutions and then go on with the rest of the procedures. If the population contains lots of invalid or bad solutions without any hope that they will generate a good solution via Crossover or Mutation then this strategy is profitable. But in case the initial population covers a small part of the solution space then starting with Selection limits the possibilities of reaching a goal solution.</p><p>Placing Selection last enables the search of a larger part of the solution space and finally choose the best of them. Especially on NP-hard problems where the solution space is large, this strategy enables first the exploration of a wide part of the space and then the cleanup which is a more fruitful strategy.</p><p><br /></p><p><br /></p><p><br /></p><p><br /></p><p><br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-74522933283798516702021-12-21T00:18:00.005+02:002023-08-21T16:32:50.760+03:00Edge Vector representation<p><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EL</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:DontVertAlignCellWithSp/>
<w:DontBreakConstrainedForcedTables/>
<w:DontVertAlignInTxbx/>
<w:Word11KerningPairs/>
<w:CachedColBalance/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]-->
</p><p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">Edge Vector
representation is a novel method of representing graphs. It was introduced
recently in the <a href="https://doi.org/10.1109/ISCC53001.2021.9631456" target="_blank">paper</a> that I presented in ISCC ’21; also available <a href="https://pantelisrodis.appspot.com/papers/ISCC_2021.pdf" target="_blank">here</a>. The
advantage of this representation is the requirement in memory usage which is
minimum, in comparison to competition. Also, encoding a graph in Edge Vector or
decoding the graph elements from the representation is efficient with
polynomial complexity.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">The open
source code of the implementation of the method used in the paper may be found
in my GtiHUB repository</span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;"><a href="https://rodispantelis.github.io/EdgeVector/" target="_blank">https://rodispantelis.github.io/EdgeVector/</a></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-ansi-language: EN-US;">I believe
you will find it useful. <br /></span></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-24283881330216956702021-10-03T16:22:00.005+03:002023-08-21T16:34:48.474+03:00Designing Genetic Algorithms<p>Recently I presented a conference paper in ISCC 2021, it is on the Service Function Chain Embedding problem; find it <a href="https://doi.org/10.1109/ISCC53001.2021.9631456" target="_blank">in IEEEexplore</a> or <a href="https://pantelisrodis.appspot.com/papers/ISCC_2021.pdf" target="_blank">here</a>. The problem is handled efficiently using a genetic algorithm. Here are a few empirical remarks about how to design efficient and effective GAs which I gained from working on this paper.<br />The issue with designing GAs is that their operation is not sufficiently explained and the efficiency of any GA design is case dependent. Any innovation applied on a GA implementation may work well on a problem and fail on many others.</p><p><br /><b>At first there is the population generation.</b> The objective of a GA is to approximate the goal solution of a problem among all the possible solutions in the solution space of the problem. So, from the members of the population we have to be able to generate the goal solution by applying the genetic procedures on the population. Then the initial population will have to be directed to the part of the solution space that contains the goal and for this reason we have examine whether it is more efficient to generate the population heuristically instead of a randomized generation which is the common practice.</p><p><br /><b>Preserving original chromosomes and best solutions.</b> The procedures of crossover and mutation were originally designed so as to affect the members of the initial population. During crossover, the parent chromosomes generate offspring that may replace them in the population. Also during mutation the genotype of a chromosome is affected and this results the replacement of the original solution that the chromosome represents by a new solution that the mutated chromosome represents. Moreover, the randomized operations of the GA may reject or replace a good solution. <br />Having these in mind, my proposition is to preserve the best solution generated during a generation regardless of how the new population will be formed. Also the generation of new offspring and new mutated chromosomes should not replace the previous ones. Add the new chromosomes in the population along with the older ones and let the selection procedure decide which will survive in the next generation.</p><p><b><br />Premature convergence.</b> There are many reasons for the premature convergence of the population in an undesirable solution. One technique of limiting this phenomenon and achieving a more stable behavior for the algorithm is the multiple execution of the algorithm and the further procedure of all the outputs. The outputted solutions from all the executions maybe combined so as to generate a probably better solution (this was my approach) or you may just pick the best one for the final output.</p><p><br /><b>Parameter tuning.</b> GAs are multiparametric algorithms and the values of these parameters determine their performance; the parameters are the number of generations, population size, crossover and mutation probabilities. There are two ways to determine the best valuations for these parameters. Either by extensive experimentation or by using an optimization procedure like the one described in my <a href="https://pantelisrodis.blogspot.com/2021/06/how-to-tune-up-parameters-of.html">earlier post</a>.<br /><br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-5971920916561777772021-06-21T23:05:00.006+03:002021-06-21T23:07:52.458+03:00How to tune up the parameters of a multiparametric algorithm<div style="text-align: justify;">Genetic algorithms are multiparametric procedures. Their operations depend on a variety of parameters these usually are the size of the initial population, the number of generations, probability thresholds that define the crossover and mutation procedures and sometimes heuristics that some developers use. One of the open problems on genetic algorithms is the determination of the optimal values for these parameters. It is also called parameter tuning.<br />Like genetic algorithms, there are other multiparametric were the determination of the optimal values for their parameters is crucial for their operation. In all the above cases, sensitivity analysis is used for reaching optimality.<br />As parameter tuning is actually an optimization problem and genetic algorithms are optimization techniques, I thought it would be interesting to build a genetic algorithm for parameter tuning. The result of this work may be found <a href="https://github.com/rodispantelis/GeneticAlgorithms" target="_blank">here </a>and it is released as an open source project.<br />The tuning algorithm examines the program that implements some multiparametric algorithm as a black box. The internal operations of the program are not examined; it only considers the output of the program given some valuation on its parameters. The population of the tuning algorithm consists of set of such valuations. It is an effective approach as I have tested it extensively.<br />It is a very interesting approach as we do not have to consider the functionality of the program under study, as the tuning algorithm adapts its functionality on the program. And this is the essence of artificial intelligence; the algorithms have to adapt to their subject of study.<br />When the program under study implements a genetic algorithm then we have a genetic algorithm that tunes up another genetic algorithm, which is a cool idea.<br />Of course the tuning algorithm is also multiparametric, but in it we do not seek optimality. It is enough to set some high values on its parameters, wait some time until it terminates and compute the optimal values for the program. Then run the program with optimal performance.</div><p> </p><p> <a href="https://github.com/rodispantelis/GeneticAlgorithms" target="_blank">https://github.com/rodispantelis/GeneticAlgorithms</a>
</p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-87794235356930825342020-10-15T19:29:00.005+03:002021-02-20T19:09:44.197+02:00A thesis on virtual network embedding with genetic algorithms<p style="text-align: justify;">Recently I finished my <a href="https://apothesis.eap.gr/handle/repo/49231?mode=full" target="_blank">master thesis</a> which is a study on the problem of virtual network embedding (VNE). It concerns the virtualization of network resources and topologies so as to create a fully functional virtual network embedded in a detacenter, instead of using a physical stand alone network. There are many advantages in this approach as it is much easier to update and maintain virtual devices and links instead of physical ones.</p><p style="text-align: justify;">There are many ways to map virtual on physical resources, a relatively small virtual topology may be embedded in many ways in the physical network of a datacenter. The problem of VNE concerns the finding of the ideal mapping so that virtualized network will have the optimal performance.</p><p style="text-align: justify;">It is a hard problem to solve so traditional analytical methods are inefficient for its solution. Artificial intelligence methods provide in such cases good and efficient solutions. In the thesis I developed a genetic algorithm that approaches the problem as an optimization problem and provides good practical solutions. </p><p style="text-align: justify;">My thesis is written in Greek and is accessible in the<a href="https://apothesis.eap.gr/handle/repo/49231?mode=full" target="_blank"> repository</a> of the Hellenic Open University. A direct download of the paper is possible in this <a href="https://apothesis.eap.gr/bitstream/repo/49231/1/123937_%ce%a1%ce%9f%ce%94%ce%97%ce%a3_%ce%a0%ce%91%ce%9d%ce%a4%ce%95%ce%9b%ce%95%ce%97%ce%9c%ce%a9%ce%9d.pdf" target="_blank">link</a>.<br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-16511463397336294532020-10-06T20:16:00.007+03:002021-12-12T23:36:42.194+02:00A Fibonacci complexity class<div style="text-align: justify;">While working on a project that will come out soon, I developed an algorithm with strange asymptotic behavior. In one of the functions of the algorithm there was an arithmetic progression that had to be computed. It was not a big deal as it concerned small sets of numbers each time, at least that's what I thought.</div><div style="text-align: justify;">So instead of using the formula of arithmetic progression, I just put a recursive function for it. Something like</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><span style="font-size: small;"><br /><span style="font-family: courier;">int d = 1000;<br />public void progression(a){<br /> while(d>0){<br /> progression(a+1);<br /><span> </span>}<br /><span> d</span>--;</span></span></div><div style="text-align: justify;"><span style="font-size: small;"><span style="font-family: courier;"><span></span>}<br />progression(0);</span></span></div><div style="text-align: justify;"><span style="font-size: small;"><span style="font-family: courier;"><br /></span></span></div><div style="text-align: justify;">Where <i>d</i> was proportional to the input.<br /><br /></div><div style="text-align: justify;">It worked fine, but it was slower than it should be. The reason was that the progression was computed quite a lot of times and eventually such a simple function was a huge computation burden. I was really surprised to discover that the asymptotic behavior of the algorithm could be described by the Fibonacci sequence.<br />So that, given <i>n</i> input the complexity of the algorithm was O(<i>f</i>(<i>n</i>)∙<i>c</i>), where <i>f</i>(<i>n</i>) is the <i>n</i>-th member of the Fibonacci sequence and <i>c</i> is constant.<br />After replacing the function with the formula of arithmetic progression the complexity became polynomial, thankfully. </div><div style="text-align: justify;">There are two remarks about all these.<br /><p>An innocent, simple and naive function may become a problem. We have to be careful on how many times this function will be executed.</p>Although the first edition of the algorithm was not optimal, there comes the question. Could we define a Fibonacci complexity class? Perhaps even find problems in this class.<br /></div><p style="text-align: left;"><br /></p>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-66068228044715460152020-07-14T12:05:00.005+03:002020-07-14T12:09:36.348+03:00A function for the Fibonacci sequence<div>A very fast and easy function to compute Fibonacci sequence</div><div><span style="font-family: "courier";"><br /></span></div><div><span style="font-family: "courier";">import java.math.BigInteger; <br /><br />public class main {<br /> int cnt=0; <br /> public static void main(String[] args) {<br /> main m=new main();<br /> m.f();<br /> }<br /> <br /> public void f(){<br /> BigInteger a = new BigInteger("0");<br /> BigInteger b = new BigInteger("1");<br /> System.out.println("F("+cnt+"): "+0);<br /> cnt++;<br /> System.out.println("F("+cnt+"): "+1);<br /> cnt++;<br /> while(cnt<22001){<br /> BigInteger i = new BigInteger("0");<br /> i=i.add(a);<br /> i=i.add(b);<br /> a=b;<br /> b=i;<br /> cnt++;<br /> }<br /> System.out.println("F("+(cnt-1)+"): "+b);<br /> }<br />}</span></div><div><br /></div><div>The output, the 22000th member of the sequence</div><div>F(22000): <br /></div><div><font size="1">23911151843088049549559913282124240747696450497332393096044892530723732731293925768111253903890731043326256888603201506944633327289997819833277130504901675470982030552507094162859800238507116975505854341394434948447565033026221210674687237739231690676803475798182981709459374260692436901977628581806475354563630219526845715243350120708966860434133018586240550140499321343707423004223534607204678776111145268537233116243802761082543246510402792429498707827152647989073216179648475243965598252066378230654130470829925986857896675242722600485435164105264916456225839778968745829788512608356363913804761755901467120731200188413083136579975059928902776220812920982189971242379916708698973621766751597334216368620508938142664716772647688988834270374687235249785796824594603884916806990714534340114784869357840251209972361365742785864148242067483656445079559019489390577428621648443326010160477386933121033620560251402766516093547505148407529090149475348773752540043271767234242084292100628738483524181221019416392799181393231992347653438406600914228647401007351836588160487756479497407968315031381589638689295174823322470087642165598672121365266344137564858444622711576081771078496641844937390545682240273855295137238355228099317669135050155578932164209299731907594076460356882408869295135953607469229651099120705693263857034687843626991261121860614751345764505435552449681904020194972948652249854216623551013979700998791070339585263264828474927294673678682855378403136525049646034651097985005523792023353505230733318315806249870620106255127740873138847984020791508370779261660785053242257951531507791170889410085082494377608208359506865872052269194573000651768246582561397589379054459666059728582161757153393761840155076715427874951737024712380325595601597280455609229448744861922777558470731225112774660744411373183007786591379470772659610931545615527361828527091916649882203801119543947473205919119948687005839582793430636346335172367632567614224230754519059566437786383250603562336173795450845023555052163775749567488680209929301733953771659440841851896501176310938478061013508743746794886211545059385083016686715569969754105054345618188437480456355103779247725818147048349484128145728116464124348995944145983490657741814168978702539394407772782423978914262812859165776960650497186523875998775018517623119052276070479290941716138770758463104282213404679330007239145717905126309090972993970782474750784981648644639346866248972640808995649185451943534239803644658697695716458521133485188727182407257352988202971646888599939358651008064484936913916373530359894095131542041397727523148718163746575229775017491009940588025249473123594753441211634435730001790835648327090911035577452758024952482629199328590011397832889757271508213625527057331090954110825073969299898958013994599894944208687850453500173980744223000760078898697128052192071515006870831715957325971845783409157683811011917636814704595836802955582938763983561376453999740428687093957605525631048148288024553370500665522100169024309239057322581866840037497559911574765827496593193700042249031389395129435568195231113075207830333318500469629193676005498811061550348234102052774122312886541766341471582469457347117636205703661078984515116258554803095676657019285090837775746036193164235341465548098904615127611062939206161346093617265405906367027661546845621356149559040798776562241563525511725505792648393371898115939776591096309370497408492873254883402409802564872039524422858633347863626333558155009162515951780107533626468012894434520530192845273457409548744656177387603307356149287599938730196582636274410931646393247886112418444661056857161146184933011078210524893794117348746892516723498126540948178477524603638775070638523850390891025039264400618873393052111880108096369408947789274041790558597294722651729924404836342862376149286822275330813331363925609055924677777163416615796764181780714265864396474084320765015608284585854217131086151555790325994153510435163207497453674171928909161205383175664268065518581620152617418382937870516278875447542815346729709387258529667056688675843466545834345387745629279011899890664127165078236901460104874038389111495950291594316779654469302636244158996341777359509518944948859542336178551804878882015290324970263731030303062802591853791022670735831866555863543199284768114955047509691099289344617944901044767695479022055197983956300649586454906832181127379710025435852700124842320460296470665284849646627146368239854763930002211169617338509922746447728861929093704279396632724922533039876469981523255796252507976652376398665656696184253857275835860915242223337528463584609575885682566329602411550875<br /></font></div><div><br /></div>Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-16260932513520322202020-03-20T00:25:00.004+02:002020-04-20T23:53:33.844+03:00Killing time while in quarantine<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
There are many posts in blogs and social networks these days about what some people do or what suggest to others to do while they are isolated in quarantine. Well, this is my suggestion.<br />
Find a difficult and interesting open problem and try to solve it. Some problem that you may understand its definition but you and the rest of the world have no idea about its resolution. In computer science and logic good candidates are the famous NP vs P problem or the Continuum Hypothesis; of course there are numerous others. <br />
Reading about the problem and working on any idea that you may have about it will not only be an interesting task but will probably make you learn something interesting and it will surely help you in killing time. Who knows, eventually you might actually solve the problem and gain fame and fortune.<br />
In case you follow this advice here is another one on how you should approach it. If you want to solve an open long standing problem you have to think innovative and differently than everybody else. If thinking like everybody else and following the mainstream would be enough to solve the problem then it wouldn’t have been open as someone would have already solved it.</div>
<div style="text-align: justify;">
<br /></div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-44672619483429619402020-03-10T22:35:00.000+02:002020-03-10T22:35:06.151+02:00CONVID-19 coronavirus quarantine. A chance to promote e-conferences.<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
The quarantine that has been imposed to many parts of the world due to the spread of the CONVID-19 virus creates a lot of problems in transportation and in events like conferences. This may be a chance to reconsider the way that scientific conferences are organized. Although modern technologies of teleconferencing are used in a wide scale in education they are not used in conferences. So in parts of the world were the organization of gatherings is nowadays impossible, conferences have to be canceled.<br />A good alternative in all these trouble is simply teleconferencing, probably including an archive of video presentations and lectures. But if the scientific community will ever move to this direction there will be more benefits than just dealing with a temporary uncomfortable situation. Promoting teleconferencing and establishing a new type of e-conferences will make conferences open to a wider audience, not just to those people that make it to attend the event. Even without the quarantine, traveling to other countries and continents to attend a conference is not always an easy case and for many people is a difficult issue.<br />The demand for open science and data should not be restricted to the free dissemination of papers and preprints. In an era were multimedia flood the web and MOOCs are the latest trend in education, conferences should follow the same direction and become open platforms for exchanging ideas and interesting results in global scale.<br /></div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-25728038912212830182019-07-14T01:05:00.002+03:002019-08-11T23:43:08.714+03:00Continuum Hypothesis and Uncountability<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
After setting the foundation on set theory by working on number sets and proving that the set <b><i>R</i></b> of real numbers is larger than the set <b><i>N</i></b> of natural numbers, Georg Cantor started working on a puzzling issue that was later called the <i>Continuum Hypothesis</i>. This deals with the following question “Is there a set of cardinality larger that set <b><i>N</i></b> and smaller that set <i><b>R</b></i> (the continuum)?”<br />
Cantor believed that the answer to the question is negative but he did not managed to prove it and no one else did. So 150 years later this belief is formed as a hypothesis and it is still open, for most people.<br />
Perhaps the most complete article on the hypothesis may be found <a href="https://plato.stanford.edu/entries/continuum-hypothesis/" target="_blank">here</a>, it explains in details the whole issue its implications and the progress so far.<br />
Researchers mainly use logic and axiomatic set theory on their attempts to prove the hypothesis. The research efforts focus on applications of the Zermelo-Fraenkel axioms with the axiom of choice; known as ZFC axiomatic system. The problem on this approach is that the hypothesis has been proven by Gödel and Cohen to be independent of ZFC. Since then, the scientific community has been divided in two parts. Scientists like Cohen believed that independence imply undecidability and the hypothesis has no answer. Others, like Gödel, believed that the ZFC system is not appropriate of resolving the hypothesis and some new system of axioms should be adopted.<br />
This post is about some remarks that I have about the hypothesis and the ZFC application on it. The belief that ZFC independence results undecidability clearly implies that the ZFC system is universal on the sense that the properties of every possible set may be effectively described by the system. As ZFC is an axiomatic system and some of its axioms rely on intuition its universality should not be taken for granted.<br />
For instance, the well-ordering theorem that is equivalent to the axiom of choice states that in every non-empty set there is one least element based on some property of the set. If we consider a set of uncomputable numbers how can we claim that any element of the set is the least element? It would be fruitful to investigate new axiomatic systems or try to provide stronger evidence about the validity of the currently used axioms.<br />
Now let us suppose that the hypothesis is false and there is set <b><i>H</i></b> the cardinality of which lays between <b><i>N</i></b> and <b><i>R</i></b>. Set <b><i>H</i></b> is uncountable and its elements are uncomputable. <br />
Set <b><i>H</i></b> is uncountable as it is larger than <b><i>N</i></b>. Considering the Turing machine model as a universal model of computation and as the set of all Turing machines is countable there are more elements in <b><i>H</i></b> than Turing machines so there are elements of <b><i>H</i></b> that do not correspond to a Turing machine and as a result they are uncomputable. There are uncomputable numbers in <i><b>R</b></i> as well and these considerations imply that a system or a theory that could be used to prove or disprove the existence of <b><i>H</i></b> should be able to handle uncomputable numbers and their properties.</div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-62183195901561176382018-08-17T17:27:00.003+03:002023-08-21T16:33:26.039+03:00A paper on defining and modeling context-awareness<div dir="ltr" style="text-align: left;" trbidi="on">
A paper I wrote a few months ago is just published.<br />
<br />
"On defining and modeling context-awareness", <i>International Journal of Pervasive Computing and Communications</i>, (2018), <a href="https://doi.org/10.1108/IJPCC-D-18-00003" target="_blank">https://doi.org/10.1108/IJPCC-D-18-00003</a><br />
<br />
Also there is an <a href="https://pantelisrodis.appspot.com/papers/Context_Awareness.pdf" target="_blank">Author Accepted Manuscript pdf</a> (or else preprint).<br />
<br />
<div style="text-align: justify;">
The paper presents a methodology on defining and modeling context-aware systems. These are systems that detect their environment in order to operate and interact with users and other systems. The methodology is based on a computational model, named Networked Turing Machine, that extends the capabilities of classical Turing machines by enclosing interaction on their operation and supports modeling of interactive and distributed computation. Then using this computational model the notion of context-aware systems is defined.</div>
<div style="text-align: justify;">
One of the motives of writing this paper is discussing context-awareness using the theory of computation. It is common in the literature of the field to talk about context-awareness using plain language and developing definitions and theoretical frameworks that avoid mathematical definitions. This habit does not allow the connection of any context-aware framework with the rich and valuable literature of computing theory and with fields like computational complexity.</div>
<div style="text-align: justify;">
The methodology in the paper describes a useful way of developing models that describe distributed systems focusing on their structure.</div>
<div style="text-align: justify;">
A case study is also presented. A model that describes the structure of the web application <a href="https://wms-viewer-online.appspot.com/" target="_blank">WMS Map viewer</a> is developed using the methodology of the paper.</div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-79409517860190700742018-05-05T22:55:00.001+03:002020-04-06T01:00:21.163+03:00Hacking geoserver.war<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
One easy and efficient way to setup <a href="http://geoserver.org/" target="_blank">geoserver </a>is as a standalone servlet on an application server like Apache Tomcat. Geoserver is <a href="http://geoserver.org/release/stable/" target="_blank">released in many formats</a> one of them is as a web archive (.war file) which contains all the necessary application and configuration files to run geoserver. This is a particularly convenient way to setup geoserver as application servers are available on cloud platforms like Amazon AWS and Azure with a simple deployment procedures and affordable prices, even free in many cases.</div>
<div style="text-align: justify;">
There is only one disadvantage in this approach. The .war file contains files with default configurations and they may not be modified during the execution of the application. So every time you need to install geoserver it is necessary to set up the configuration from scratch; nothing is saved on the web archive. This is quite problematic as you will have to setup geoserver from scratch even after a simple reboot of Tomcat or the cloud container. Luckily you may easily hack it.</div>
<div style="text-align: justify;">
Web archives .war files are simple zip files, changing their extension or opening the file on a zipping application is enough to reveal their content. As far as it concerns the configuration files of geoserver they are the same on all formats for all platforms. So this is what to do.</div>
<div style="text-align: justify;">
Download the platform <a href="http://geoserver.org/release/stable/" target="_blank">independent platform binary version </a> and run the application on your local machine. Set up the application as you will, setup map layers, wms layers, styles and anything else. Don’t forget to change the passwords and security settings.</div>
<div style="text-align: justify;">
Unzip and delete the files from the data directory of the web archive. Then copy the files from the "data_dir" directory of the locally installed application to the "data" directory of the web archive. Zip again the web archive version and change the extension back to .war. You are fine. </div>
<div style="text-align: justify;">
Deploying the modified .war file on cloud or on an application server will get you a working geoserver with the setting you have applied locally as default settings.</div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-15366433484292963572018-03-14T13:04:00.000+02:002018-03-14T17:13:28.446+02:00An interestng lecture of Steven Hawking about randomness<div dir="ltr" style="text-align: left;" trbidi="on">
There are some scientists that besides their talent in discovering the mysteries of the universe also have a talent in talking in plain and comprehensive language about them.<br />
Steven Hawking definitely had both talents. This lecture of his about randomness is an example.<br />
<a href="http://www.hawking.org.uk/does-god-play-dice.html">http://www.hawking.org.uk/does-god-play-dice.html</a><br />
<br />
-RIP</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-3280427177799423862017-11-09T17:24:00.001+02:002017-11-09T17:27:22.281+02:00On line generator of random graphs and trees<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://wms-viewer-online.appspot.com/random/randomgraphs.html" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt="Random Graphs" border="0" data-original-height="128" data-original-width="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7wb0cO7CajFBYATHq8UuAbsIiGOv0P412YqIVbDg8VcvawCSxzWKjlzvUomyl2izKKRpy2AKUTIhV7NIaSifZ3qIxX8hyKZi-kKtJhEjZ8pkgd925SXA00aizblXFo7jVRxW-WcDYqA/s1600/icon-128.png" /></a></div>
After studying and talking about graphs for so many years I thought I should build an application about them. <a href="https://wms-viewer-online.appspot.com/random/randomgraphs.html" target="_blank">Here</a> you may find my random graph web application.</div>
<div style="text-align: justify;">
You may generate random graphs and trees by inputting parameters like graph density, minimum and maximum node degrees and number of nodes. The graphs are outputted in DIMACS format which I believe is easy to work with. So you may easily produce graphs for experimentation and software testing.</div>
<div style="text-align: justify;">
The most interesting part is the random tree generator. The algorithm that I have developed for it is interesting, I believe, and rather easy to understand. Considering the user inputted Graph Density parameter, for every node in the graph the algorithm decides whether or not to add adjoined nodes. This procedure is iterative until the graph reaches the desired number of nodes. The produced graph is a tree as every new node is adjoined only with one older node so circles may not be formed.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Why a web app? </div>
<div style="text-align: justify;">
I believe a web application is the best way to demonstrate a scientific idea, if it is possible to build an application about it. Web applications don’t need installation; they are easy to access; the user may easily get to the point of what they are all about.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
The application is partially compatible with IE and Edge, you should better use it with Firefox or Chrome.</div>
<br />
<a href="https://wms-viewer-online.appspot.com/random/randomgraphs.html" target="_blank">https://wms-viewer-online.appspot.com/random/randomgraphs.html</a></div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-64396229388463869232017-09-22T00:25:00.000+03:002017-09-22T00:25:35.302+03:00Android Studio vs Eclipse<div dir="ltr" style="text-align: left;" trbidi="on">
When it come to Android app development there are really two choices Android Studio and Eclipse. I have been using Eclipse for Java and Android development the last 4 years. Besides the Android emulator disastrous function which makes using emulators a torture, I really have good impressions about working with Eclipse; you could say I am a fan. Nowadays Eclipse lacks official support from Google but it is easy to install Android IDE through the Eclipse marketplace and have your system up to date. In marketplace you may find a huge collection of libraries and development tools that may boost you productivity and potentials.<br />But then Android Studio arrived. It is really not that new as it is based on IntelliJ platform that has been around for some years. The thing about it is that it is the official Android IDE supported by Google. So you must give it a try.<br />In comparison to Eclipse, Android Studio has some valuable advantages like better emulator performance, more comprehensive error messages and reports. It also loads almost automatically the required libraries and references and downloads the necessary Android SDK components.<br />The downside of using Android Studio is its demand in computational and storage resources, at least when used in MS-Windows. Even when performing simple tasks it requires really large amounts of RAM. You can sense your whole system slowing down even in modern computers. Compiling and packaging the same application with Studio and Eclipse is a completely different story and it takes a while or a lot more in Studio, while both produce basically the same product.<br />In storage requirements things are worse. Apart from its installation files Studio stores strangely large amounts of data in other places. In the AppData folder it stores some gigabytes of data, for some reason . While in operation it creates a few gigabytes of temporary files. In the users folders, Studio also stores some gigabytes of probably personalized data. It really makes you wonder if all these are really necessary, other IDE’s do not ask for so much and certainly Eclipse is one of them. Another thing I noticed is that for the same applications, the project files generated by Studio are even ten times larger in storage space then those generated by Eclipse. Still they produce the same applications.<br />My opinion based on all these, is that if you don’t need an emulator then Eclipse is a more productive tool for application development.<br /></div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-50046549234749010302017-09-06T01:21:00.000+03:002017-09-06T01:21:03.710+03:00The wrong way to upgrade a Cloud Platform<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
The need for upgrading a platform that hosts cloud services and applications derives from a variety of pretty good reasons. </div>
<ul style="text-align: left;">
<li>There are always improvements that you may apply in the structure and architecture of your platform</li>
<li>Faster more intelligent and more reliable algorithms and procedures will benefit your cloud performance; so you should upgrade</li>
<li>A modern cloud infrastructure must support modern technologies; so you have to upgrade</li>
<li>As time goes by, clouds become bigger their services are delivered faster and their users are increased; you your cloud has to manage the extra burden </li>
<li>If you don’t consider the above and you do no upgrade your platform will become useless in a while</li>
</ul>
<div style="text-align: justify;">
Let’s suppose that you have decided to upgrade and you also have set the specifications and goals of your upgrade. There is a key issue on applying the necessary changes. This is backward compatibility. In simple words, you have to answer the question “How easily the users and applications of the previous version of my platform will adapt to the new version?”.<br />This is not an easy question to answer and depends on how big the upgrade will be. There are cases where upgrades are almost invisible as the architecture of the platform does not change dramatically and the hosting specifications stay the same and on the end no-one notices any change. There are also case where the change is quite big to miss. Usually old architectures become useless after some time and an upgrade has to be like building the platform from scratch.<br />In case of the second category, the administrators of the platform have to design an easy and as possible less painful way for users, developers and applications to migrate. Give the developers and users some time to understand the new platform. Keep both versions running in parallel for an efficient amount of time. Give the developers and users a good and clear deadline for migrating to the new version and make sure this migration will be feasible within this time.<br />Another important issue is the terms of use and the pricing policy of the new version. In case of incompatibility between the terms of use of the two versions or in case of radical changes in the pricing policy then the users will have to migrate to a new version of the platform that does not satisfy them or their needs any more. Moreover it is, at least, not decent to trap your old clients that have invested in your platform into a new version that does not satisfy their needs any more, constrains them and makes them spend more.<br />This is exactly what happened with Open Shift the cloud platform of Red Hat. A new promising version of the platform was recently released (version 3) and Open Shift made in short an important announcement. The architecture of the platform has changed so you have to adapt to it the architecture of your apps; the pricing policy has change, to more expensive, so reconsider your budget; you have one month to upgrade.<br />It sounded like a joke but it was true. One month is a short period of time to adapt to a new architecture. Reading the terms and conditions while signing for version 2 it was clearly written that the pricing policy would not change. We all thought that this would be for the whole platform; I think they meant to write that this would be only for the current version. After lots of complains the deadline was extended to four months only for the customers that had sighed on a paying plan. <br />Still, this is not a serious and professional way to upgrade a popular cloud platform.<br /></div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-51417531462001161612017-04-18T21:01:00.003+03:002017-09-01T19:44:34.058+03:00Indexing and publishing web maps<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="https://wms-viewer-online.appspot.com/" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"><img alt="https://wmsviewer-rodis.rhcloud.com/" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiivsvc6ThhjCJDDWLoPWhfVOGmEK1_V4L4mn42vCkNfBFZdr9qH0mrL_JUJAiFdO_m1CcuUmuJOllkTKuc39x4LQZe9b5p7W6N76o67lLOmy42x62th44xxU8UsxOhp0GpBLrqccDj_g/s1600/wms-114.png" /></a>Web maps provide a useful and interactive experience in map handling and this along with the rich available content they offer justifies their extensive spread on the internet. Despite this fact, the protocols that the operation of web maps is based on are not directly supported by internet browsers so additional software is usually required for accessing web maps. <br />
The most popular open web map protocol is WMS and it is used in web sites along with libraries like OpenLayers or Leaflet to support its operation. In order to index web maps or perform general purpose mapping operations, users should either use GIS packages like QGIS or Global Mapper which are desktop applications with limited portability capabilities or turn to applications like ArcGIS Online with restricted usage and subscription based access.<br />
<a href="https://wms-viewer-online.appspot.com/" target="_blank">WMS Map Viewer on line</a> is an http/JavaScript general purpose application for accessing and indexing web maps. The application is provided as SaaS (Software as a service) so that the necessary software required for managing web maps is rapidly loaded while accessing the web site of the app. Then the users may open the maps of their choice by simply entering its URL and layer name or choose from a list of preconfigured connections to various map sources.<br />
The application is freely accessible without needing to create an account or subscribe. Also, it is compatible with all modern versions of the WMS protocol providing easy access to any web map. There are also other interesting built-in features like the ability to overlay map layers over other open maps enabling the composition of multilayer maps; the ability to open and display .kml file; the function of drawing on the maps and outputting the drawings as point, line or polygon .kml files.<br />
An important feature of the app that empowers portability is the ability to store all open map layers in a single file that users may share and view from anywhere. The save & share feature is accessible as an option from the Tools drop down menu or from the Layers button. Using this feature the map layers that the user has open are saved in an .html file which contains all the information to load them again on the same or any other device desktop or mobile.<br />
So, the saved .html files may be posted, shared or published on line as part of a website. Accessing the files from any device will open <a href="https://wms-viewer-online.appspot.com/" target="_blank">WMS Map Viewer on line</a> with all the layers loaded as they were saved. These features make this application ideal for indexing, sharing and publishing sets of web map layers as third-parties may access and display the map without installing extra software everything will be loaded after double clicking (or tapping) on the .html file.<br />
<br />
<a href="https://wms-viewer-online.appspot.com/" target="_blank">https://wms-viewer-online.appspot.com/</a><br />
<br />
<br />
<br /></div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0tag:blogger.com,1999:blog-3112341761861364104.post-75133112513246768042016-12-10T01:24:00.002+02:002016-12-10T01:30:49.989+02:00Create files with Javascript<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: justify;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyR7N88WDEdmiSGeHXahDLuqPDyoPxcaLc0t1wUD4shNl8TsmiGq8fnfKwuaMMVk9z6U1A1eVbI6tiHlUdBKUdHf5FW4r3-F9yhVbDwU-lKVqLBaYBXbVxDZig-TYC7CzdxJDHf_ZFWA/s1600/JavaScript-small.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyR7N88WDEdmiSGeHXahDLuqPDyoPxcaLc0t1wUD4shNl8TsmiGq8fnfKwuaMMVk9z6U1A1eVbI6tiHlUdBKUdHf5FW4r3-F9yhVbDwU-lKVqLBaYBXbVxDZig-TYC7CzdxJDHf_ZFWA/s200/JavaScript-small.png" width="200" /></a></div>
In web apps (the new trend is to call them progressive apps) it is often useful to create files on the fly. On this I talk about creating files on the user’s computer by executing some piece of code on the user’s browser and then let the user view them and even store them locally. The other alternative is to create files on the cloud so that the user may then download them, but sometimes this is not necessary. So let’s see how this can happen by placing a few lines of Javascript code on the web app.<br />
The following example regards creating text files from text that is inputted by the user. For this we need a web page with basic formation and a textarea with id=”input” where users may type whatever they wish. Then some function that creates a file from input. And finally a function that makes the file downloadable.<br />
The makeTextFile function creates the file on text input. At first it creates a null variable named textFile which will become the text file. Then a Blob named “data”. A blob is an object of immutable data (text or binary) that may be used like a file and Javascript uses blobs in order to manipulate files; in some cases this technique is used in order to prevent direct access of a script to the file system. You may create blobs containing binary or text data but in this example we focus on text files so our blob is of type 'text/plain'. Next step is to create a URL pointing to the blob using function URL.createObjectURL. <br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />var textFile = null;<br />function makeTextFile (text) {<br /> var data = new Blob([text], {type: 'text/plain'});<br /> textFile = URL.createObjectURL(data);<br /> return textFile;<br /> };</span><br />
<br />
Function txt() that follows stores user input in variable textbox which will then be the input of makeTextFile function. Then the link with id=”downloadlink” of the web page is declared to point to the output of makeTextFile function. So by clicking on the link, user input is downloaded as a text file.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">function txt() {<br /> var textbox = document.getElementById('input');<br /> var link = document.getElementById('downloadlink');<br /> document.getElementById('downloadlink').download='notes.txt';<br /> link.href = makeTextFile(textbox.value);<br />}</span><br />
<br />
Find the full source code of the above example in <a href="https://drive.google.com/open?id=0B1PPRH8AEiQcVnVCYndxR3Npek0" target="_blank">this link</a>. In order to make this example I used various sources and examples from the web so there is no ownership on it; in other words “use it as you wish”.</div>
</div>
Pantelis Rodishttp://www.blogger.com/profile/11999985308984556045noreply@blogger.com0