Skip to content
  • 0 Votes
    1 Posts
    686 Views
    No one has replied
  • 0 Votes
    2 Posts
    1k Views
    zareenZ
    Ideas Solution Q No 01 Solution: NP -> Adj NP The draw parse trees for above given grammar: [image: cR7P0Ng.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. NP -> NP Conj NP The draw parse trees for above given grammar: [image: wflQD6P.png] The above grammar has two different parse trees therefore the given grammar is ambiguous. NP -> Adj N The draw parse trees for above given grammar: [image: IueNDrQ.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. NP ->N The draw parse trees for above given grammar: [image: zjft37X.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Adj -> Young The draw parse trees for above given grammar: [image: zylKfdU.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Conj -> and The draw parse trees for above given grammar: [image: 4UWakYM.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. N -> Boys | Girls The draw parse trees for above given grammar: [image: m7DKSyn.png] The above given grammar have only one parse tree so it is non-ambiguous grammar. Q No 02 Solution: The given grammar is S -> S + S | S / S | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 The draw parse trees for above given grammar: Parse Trees: [image: hamteDh.png] The above grammar has two different parse trees therefore the given grammar is ambiguous. THE END!
  • 0 Votes
    3 Posts
    2k Views
    zareenZ
    @zareen said in CS606 Assignment 1 Solution and Discussion: Use Subset Construction algorithm to find DFA for the NFA constructed in Task 1. The resulting DFA is [image: 3WrueIX.png]
  • 0 Votes
    1 Posts
    837 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    zareenZ
    Answer 1 (a) Uplink Frequency Band=890 − 915MHz Downlink Frequency Band = 935 − 960 MHz Frequency Width for any band =Upper Frequency Limit − Lower Frequency Limit =915−890MHz =25MHz Width of a frequency channel=200KHz Maximum Available Channels = Band Width / Channel Width [image: Ni9sgA9.png] However, actually 124 channels are used if you consider the guard bands used between adjacent channels to avoid any inteference Answer – 1 (b) Channel Number (C ) = 50 Uplink carrier frequency for channel 50 = F uplink (50) Fuplink (50) =Baseuplink frequency + ChannelWidthz * Channel Number =890MHz+(200KHzx50) =890MHz+(0.2x50MHz ) =890+10MHz = 900 MHz Fdownlink (50)=Downlinkcarrier frequency forchannel50+DuplexSpacing =900MHz+45MHz = 945 MHz Alternate Method for calculating Downlink carrier frequency for channel 50 Downlink carrier frequency for channel 50 = Fdownlink (50) Answer 2 (a) Fdownlink (50) =Basedownlink frequency+ChannelWidthChannel Number =935+(200KHz50) = 935MHz+(0.250MHz ) = 935+10MHz = 945 MHz Ali is able to receive signals from Zain Network due to Roaming Service. Mobilink does not have coverage in Makkah so in order to provide coverage to its subscribers, Mobilink has an agreement with Zain Network. As per this agreement, Zain Telecom provides all the available services to the roaming customer of Mobilink. Answer 2(b) Following network components will be used in this case • Mobilink’s HLR • Zain’s MSC and VLR • Mobilink’s Authentication Center (AuC) Answer 2© When Ali makes a call from his phone, the request will first go to Zain Telecom’s BS (Base station) which will direct the request to MSC the Switching Center. MSC has a dedicated VLR (Visitor Location Register) installed which is dedicated for the visitor users. Since, Ali is a visitor, MSC will request VLR to fetch the Ali’s subscription details. If Ali’s subscription is already available, the VLR will authenticate Ali and allow the MSC to proceed with the call. Otherwise, VLR will look up the subscriber information from HLR. HLR before sending the subscriber details, asks AuC (Authentication Center) to authenticate the subscriber. If subscriber is valid and not blocked, then HLR provides the subscriber details to VLR.****
  • 0 Votes
    3 Posts
    1k Views
    zareenZ
    Idea Solution <?php if(!isset($_GET['customer_id']) || !isset($_GET['units'])){ $customer_id = 0; $units = 0; } else{ $customer_id = $_GET['customer_id']; $units = $_GET['units']; } $amount = 0; if($units > 0 && $units <= 50) { $amount = $units * 0.50; } else if($units <= 150) { $amount = 50 * 0.5 + (($units - 50) * 0.75); } else if($units <= 250) { $amount = 50 * 0.5 + 100 * 0.75 + (($units - 150) * 1.00); } else { $amount = 50 * 0.5 + 100 * 0.75 + 100 * 1.0 + (($units - 250) * 1.50); } $tax = $amount * 0.18; $payable = $amount + $tax; $lp_surcharge = $payable * 0.05; $late_payable = $payable + $lp_surcharge; ?> <html> <head> <title>Assignment No. 2 (Solution) - Fall 2019</title> </head> <body bgcolor="#CCCCCC"> <table width="1800" border="0" align="center" cellpadding="20" cellspacing="0"> <tr> <td height="200" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h1>Natural Gas Company Pakistan</h1></td> </tr> <tr> <td width="300" align="center" valign="top" bgcolor="#FF9966"><table width="100%" border="0" cellspacing="0" cellpadding="20"> <tr> <td align="right"><strong>Customer ID</strong></td> </tr> <tr> <td align="right"><strong>Units Consumed</strong></td> </tr> <tr> <td align="right"><strong>Cost of Gas</strong></td> </tr> <tr> <td align="right"><p><strong>Taxes (18%)</strong></p></td> </tr> <tr> <td align="right"><strong>Payable within Due Date</strong></td> </tr> <tr> <td align="right"><strong>Late Payment Surcharge (5%)</strong></td> </tr> <tr> <td align="right"><strong>Payable after Due Date</strong></td> </tr> </table> </td> <td height="500" align="left" valign="top" bgcolor="#FFDECE"><table width="100%" border="0" cellspacing="0" cellpadding="20"> <tr> <td><strong><?php echo $customer_id; ?></strong> </td> </tr> <tr> <td><?php echo $units; ?></td> </tr> <tr> <td><?php echo $amount; ?></td> </tr> <tr> <td><?php echo intval($tax*100) / 100; ?></td> </tr> <tr> <td><?php echo intval($payable * 100) / 100; ?></td> </tr> <tr> <td><strong><?php echo intval($lp_surcharge * 100) / 100; ?></strong></td> </tr> <tr> <td><strong><?php echo intval($late_payable * 100) / 100; ?></strong></td> </tr> </table></td> </tr> <tr> <td height="140" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h4>Copy Rights: NGCP</h4></td> </tr> </table> </body> </html> Ideas 2 <?php if (isset($_POST[‘submit’])) { $salary = $_POST[‘salary’]; if ($salary>50000) { $insurance = (20/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance; }elseif($salary>40000){ $insurance = (15/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance; }elseif($salary>30000){ $insurance = (10/100)*$salary; echo “Your salary is “.$salary . ” And Calculated insurance is “. $insurance;
  • 0 Votes
    3 Posts
    963 Views
    zareenZ
    Solution Idea Code <html> <head> <title>CS202 Assignment no 2</title> <style> body{ padding:0; margin:0; width:100%; } #mynav{ background-color:black; height:80px; } #mynav a:link, a:visited { background-color: red; color: white; padding: 14px 25px; text-align: center; text-decoration: none; display: inline-block; } #mynav a:hover, a:active { background-color: black; } #firstimage img{ width:100%; height:600px; fill:cover; margin: 0px auto; } #serviceheading{ padding-top:10px; padding-bottom:10px; } #serviceheading h2{ text-align:center; } .servicesection{ width:32%; float:left; padding-left:5px; margin-bottom:5px; } .servicesection img{ width:15%; height:100px; padding-left:80px; margin:2px; } .servicesection h2{ margin: 5px 20px; } #banner1{ background-color:#21E6E0; } #banner2{ background-color:#F91912; } #banner3{ background-color:#58F912; } #myfooter{ width:99%; margin-top:5px; background-color:black; float:left; padding-bottom:100px; } #footer1{ width:41%; margin-left:5px; float:left; } #footer1 h3{ color:Red; padding-left:150px; } #footer1 p{ color:white; } #footer2{ width:41%; margin-left:90px; float:left; } #footer2 h4{ color:green; font-size:25px; } #btn{ background-color:#F91912; } #btn:hover{ background-color:green; } </style> </head> <body> <form action=""> <div id="mynav"> <a href="Home.html">Home</a> <a href="service.html">Service</a> <a href="about.html">About</a> <a href="contactus.html">Contact us</a> </div> <div id="firstimage"> <img src="banner.jpg" alt="Banner Image"> </div> <div id="serviceheading"> <h2>Service</h2> <div class="servicesection" id="banner1"> <img src="camera.PNG" alt="Banner Image"> <h2>Photgraphy</h2> <p> orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> </div> <div class="servicesection" id="banner2"> <img src="video.PNG" alt="Banner Image"> <h2>VideoGraphy</h2> <p> orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> </div> <div class="servicesection" id="banner3"> <img src="web.PNG" alt="Banner Image"> <h2>Web Design</h2> <p> orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. </p> </div> <div id="myfooter"> <div id="footer1"> <h3>About Us</h3> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop </p> </div> <div id= "footer2"> <h4>Contact Us</h4><br> <input type="text" placeholder="name"><br><br> <input type="text" placeholder="Email Addres"><br><br> <textarea rows="4" cols="50"> </textarea><br><br> <button id="btn"> Press Me</button> </div> </div> </form> </body> </html> cs202 assignment solution with internal css in head section.html Displaying cs202 assignment solution with internal css in head section.html.
  • 0 Votes
    8 Posts
    7k Views
    cyberianC
    modules:composer.user_said_in, @cyberian, CS201 Assignment 1 Solution and Discussion Write a C++ program that performs the following tasks: 1-Print your name and VU id. 2-Add last 3 digit of your VU id. 3-Display the result of sum on screen. 4-Use if-else statement :: a) If sum is odd then print your name using while loop. Number of iterations of while loop should be equal to the sum. b) If sum is even then print your VU id using while loop. Number of iterations of while loop should be equal to the sum. [use remainder operator on sum value to determine the odd and even value for if condition] For example, suppose the student id is BC123456781. Then by adding last 3 digits of vu id, we get 16 which is an even number. In this case, program should print your VU ID for 16 times using while loop. // C201 Assignment No: 1 Fall2021 #include <iostream> #include <string> using namespace std; void printnameid(string studentid, string studentname); int calculatelastthreedigits(string studentid); int main() { string studentid="bc123456789"; string studentname="ZAHID"; printnameid(studentid,studentname); int TotalLastThreeDigits=calculatelastthreedigits(studentid); int counter=1; int a,b,c; a=6; b=4; c=0; cout<<"Sum of Last Three Numbers ="<<a+b+c; cout<<"\n\n"; if ( TotalLastThreeDigits % 2 == 0) // Divide by 2 and see if the reminder is zero? then it is even otherwise it is odd number { cout << "the sum is an even value: \n\n"; cout<<"++++++++++++++++++++++++++++++++++++++++++++ \n\n"; while(counter <= TotalLastThreeDigits) { cout << " Iteration: " << counter << "\n"; cout << "My student id is:" << studentid << "\n"; counter++; } } else { cout << "the sum is an odd value: \n\n"; while(counter <= TotalLastThreeDigits) { cout << " Iteration: " << counter << "\n"; cout << "My name is " << studentname << "\n"; counter++; } } return 0; } void printnameid(string studentid, string studentname){ cout<<"My name is " << studentname << "\n\n\n"; cout<<"My student id is:" << studentid << "\n\n\n"; } int calculatelastthreedigits(string studentid) { int end=studentid.length(); // Ending point that is total length of string int start=end-3; // Starting point string lastthreedigits=studentid.substr(start,end); // Trim the last three digits; int total=0; //Calculate the sum of last three digits for ( int index=0; index < lastthreedigits.length(); index++) { total += lastthreedigits[index] - '0'; } return total; // return the total to calling statement. }
  • 0 Votes
    1 Posts
    513 Views
    No one has replied
  • 0 Votes
    1 Posts
    412 Views
    No one has replied
  • 0 Votes
    4 Posts
    1k Views
    zareenZ
    Main Code File string stringToSearch = TextBox1.Text; string[] lines = File.ReadAllLines(@"H:/james.txt"); foreach (string line in lines) { if (line.IndexOf(stringToSearch) >= 0) { Label1.Content = line; break; } else { Label1.Content = "VU ID Not Found"; } } XAML File <Window x:Class="CS411_Assign.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Grid> <TextBox x:Name="TextBox1" HorizontalAlignment="Left" Height="23" Margin="165,87,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="237"/> <Button Content="Search" HorizontalAlignment="Left" Margin="165,153,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/> <Label x:Name="Label1" Content="Data" HorizontalAlignment="Left" Margin="165,206,0,0" VerticalAlignment="Top" Width="222"/> <Label Content="Vu-Student Id" HorizontalAlignment="Left" Margin="10,87,0,0" VerticalAlignment="Top"/> </Grid> </Window>
  • 0 Votes
    1 Posts
    590 Views
    No one has replied
  • 0 Votes
    12 Posts
    9k Views
    zareenZ
    LISP was basically developed to solve ________ problems. Page:75 LISP was one of the earliest programming language. It was designed at MIT for artificial intelligence and it has since been the defacto standard language for the AI community, especially in the US. [image: YqqcYKG.png] For immediate value assignment ______ sign is used. Page 37 The $ is used for immediate value assignment even if the entire pattern does not match. It is used as follows: [image: gKNPMuJ.png] Following statement returns the union of the two list in LISP. Page : 68 [image: K6o3kdx.png] Block statement in Ada is very similar to a block in _______. Page:56 [image: 4Cbvxg8.png] _____________ was considered good for describing algorithms. Page:24 [image: TimQMFg.png] The declarative language among the following is CS508 C Page:77 [image: SIkM5O2.png] In Ada programming language Tagged types are used for _____ Page:59 [image: k1utbxn.png] _____ are a type of Aliasing. [image: 6kgY8ip.png] How many element(s) are there in LISP list (a (b c))? CS508 1 Page:63 [image: NxpDf0O.png] In __________, Enumeration type can also be used as indexes in arrays. Page:51 [image: Sb8NMfp.png]
  • FRL101 Quiz 2 Solution and Discussion

    Solved Freelancing frl101 quiz 2 solution discussion batch-05
    14
    0 Votes
    14 Posts
    16k Views
    zareenZ
    One of the biggest drawbacks of freelancing is: You disconnect from society You get hospitalized You do not get to see your family You do not get any time outside computer
  • 0 Votes
    4 Posts
    979 Views
    zaasmiZ
    CS507 2 SOLUTION.docx
  • 0 Votes
    3 Posts
    1k Views
    zaasmiZ
    https://youtu.be/9SH5eM0914A https://youtu.be/9SH5eM0914A https://youtu.be/P_4x86p5dVI
Reputation Earning
How to Build a $1,000/Month World CUP LIVE Matches Live Cricket Streaming
Ads
File Sharing
Stats

0

Online

3.0k

Users

2.8k

Topics

8.6k

Posts
Popular Tags
Online User
| |