কয়েকদিন আগে আমাদের বিশ্ববিদ্যালয়ের গণিত বিভাগে শিক্ষক দিবস উপলক্ষ্যে একটি অনুষ্ঠান হয়। ছাত্র-ছাত্রীদের অতুলনীয় শিল্পী সত্তার প্রদর্শন দেখে কেবল আমি নয় বিভাগের সবাই যথেষ্ট আশ্চর্য। এইদিন আমি একটি কবিতা লিখে নিয়ে আসি যা সময়ের অভাবে সেখানে তুলে ধরা হয়নি। আজি হতে শতবর্ষ পরে, কেউ যদি আমার লেখা কবিতাখানি পড়ে তবে ভাববো লেখা সার্থক হয়েছে। গুরুর দায়িত্ব-গুরুদায়িত্ব আজকে আমি লোকের কাছে হলাম বড় মানী, কারণ আমার গুরু ছিলেন ভীষণ রকম দানী। আমায় তুলে ধরতে গিয়ে নিজের পাকলো চুল, তবু প্রশ্নের উত্তর দিতে কভু করেননি ভুল। কিশোর থেকে যুবক কিংবা যুবক থেকে বৃদ্ধ, মানুষ থেকে মনীষ গড়তে তিনি হস্তসিদ্ধ। এই গুরু কোনো একজন নয়, নয়কো পুরুষ-স্ত্রী, এই গুরু এক দিব্যজ্যোতি, অপূর্ব তার শ্রী। সেই জ্যোতি কে তীব্র করতে কারা তৎপর জানো? যাদের কে তোমরা পার্থিব রূপে 'শিক্ষক' বলে মানো। নতশিরে আজ জানিয়ে প্রণাম গুরুদের চরণে, চলো আবারও পুনরায় ফিরি জ্ঞানের আহরণে। ফুরালে সময় তাদের একদা ছাড়তে হবে ভার, তবে সে জ্যোতিকে তীব্র করার দায়িত্ব হবে কার? কিছু কি বুঝেছো তোমাদের তবে কাজটা হলো কী? গুরুর স্থানে গুরু হয়ে বসবে, আবার কী। নিতে...
Hey everyone. In this blog I would like to share a very small project in python. In this project we can calculate the adjacency matrix of a graphic sequence in a simple algorithm. The code is here: #Enter the sequence in the array gseq. It has to be a graphic sequence gseq = [4,4,2,2,2,1,1,0] n = len(gseq) #Next we define the number of rows and columns of the adjacency matrix. rows, cols = (n, n) arr = [[0 for i in range(cols)] for j in range(rows)] #starting algorithm for i in range(n): for j in range(n): if i==j: arr[i][j]=0 else: if gseq[i]>0 and gseq[j]>0: arr[i][j] = 1 arr[j][i] = 1 gseq[i] -= 1 gseq[j] -= 1 print(arr) ================================= I hope you will understand the program. If there is any error let me know in the comments.
The Baton Pass Problem: A computational approach via Python Problem: In a circular line of 100 people everyone has been attached to a unique number that starts from 1 and ends with 100. They are now standing side by side making a loop, i.e., now player no. 1 is between player no. 2 and player number 100. A baton must be given to a random player. The player who has the baton has the power to eliminate one player from the ring and pass the baton to the next active player. Active in the sense that the player is not eliminated. The elimination must be done in the following manner. In a group of five people suppose that no. 1 has the baton. No. 1 will eliminate No. 3 (the player second next to no. 1) and pass the baton to no. 2. Next no. 2 will eliminate no. 5 and pass the baton to no. 4. No. 4 then eliminate no. 2 and this gives our finalists 1 and 4. You can visualize it as: Trial 1 1 2 3 4 5 Trial 2 ...
Comments
Post a Comment