Modify your models and coding of Chebyshev center and building a house to get the right anwsers. # Given matrix A and vector b A = [2 -1 2; -1 2 4; 1 2 -2; -1 0 0; 0 -1 0; 0 0 -1] b = [2; 16; 8; 0; 0; 0]

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

*how to add norm or linearAlgebra in julia? i tried and add scrrenshort here but can not.give me screenshort how to add and solve my problem?

* how can i define norm in julia codding?it not define as my screenshort of solution?

jupyter nootebook python with julia (without cvxpy as cp, numpy as np)

1: Modify your models and coding of Chebyshev center and building a house to get the right anwsers. 

# Given matrix A and vector b

A = [2 -1 2; -1 2 4; 1 2 -2; -1 0 0; 0 -1 0; 0 0 -1]
b = [2; 16; 8; 0; 0; 0]

Home Page - Select or cre X
Getting Started
chep center norm not - Ju X
1 -2°C
多云
localhost:8888/notebooks/chep%20 center norm not.ipynb
intoDNS: decodeslab.c... Bkash.com - WHOIS &...
UPDATE Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions- Please note that updating to Notebook 7 might break some of your extensions.
File
9
Jupyter chep center norm not Last Checkpoint: 5 minutes ago (autosaved)
Cell Kernel
Widgets Help
Code
+
Edit
g 2
View Insert
I
Untitled48 - Jupyter NotebX
↑ ✓
Free Email Extractor D... 主页 -清华大学研究生...
In [10]: Define the model
▶ Run
In [9]: # Import necessary packages.
using JUMP, Ipopt
Out [10]: A JUMP Model
model = Model(Ipopt.Optimizer)
■
Feasibility problem with:
Variables: e
C
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: Ipopt
In [11]: # Define the variables
16
8
0
Ø
# radius
@variable (model, r = 0)
@variable (model, x[1:3]) # center
out [11]: 3-element vector(variableRef}:
x[1]
x[2]
x[3]
In [12]: # Define the matrix A and vector b
A = [2 -1 2; -1 2 4; 1 2 -2; -1 0 0; 0 -1 0; 0 0 -1]
b = [2; 16; 8; 0; 0; 0]
out [12] 6-element vector(Int64}:
UndefvarError: 'norm not defined
Home Page - Select or cre X
and
In [25]: # Define the constraints
for i in 1:size(A, 1)
@constraint (model, A[i, :]' *x + r ³ norm(A[i, :]) <= b[i])
end
[3] top-level scope
@ .\In[25]:3
stacktrace:
[1] macro expansion.
@D:\Julia-1.9.3\Julia PKG\packages\MutableArithmetics\K9YPJ\src\rewrite.j1:321 [inlined]
[2] macro expansion
@D:\Julia-1.9.3\JuliaPKG\packages\JUMP\D44Aq\src\macros.j1:717 [inlined]
W
主页 -清华大学研究生...
S
Not Trusted
chep center norm not - Ju X
P
Logout
Julia 1.9.3 O
50%
Home_留学中国
X
+
New user screen
ENG
US
I
X
3:13 AM
12/3/2023
|||
Don't show anymore
Transcribed Image Text:Home Page - Select or cre X Getting Started chep center norm not - Ju X 1 -2°C 多云 localhost:8888/notebooks/chep%20 center norm not.ipynb intoDNS: decodeslab.c... Bkash.com - WHOIS &... UPDATE Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions- Please note that updating to Notebook 7 might break some of your extensions. File 9 Jupyter chep center norm not Last Checkpoint: 5 minutes ago (autosaved) Cell Kernel Widgets Help Code + Edit g 2 View Insert I Untitled48 - Jupyter NotebX ↑ ✓ Free Email Extractor D... 主页 -清华大学研究生... In [10]: Define the model ▶ Run In [9]: # Import necessary packages. using JUMP, Ipopt Out [10]: A JUMP Model model = Model(Ipopt.Optimizer) ■ Feasibility problem with: Variables: e C Model mode: AUTOMATIC CachingOptimizer state: EMPTY_OPTIMIZER Solver name: Ipopt In [11]: # Define the variables 16 8 0 Ø # radius @variable (model, r = 0) @variable (model, x[1:3]) # center out [11]: 3-element vector(variableRef}: x[1] x[2] x[3] In [12]: # Define the matrix A and vector b A = [2 -1 2; -1 2 4; 1 2 -2; -1 0 0; 0 -1 0; 0 0 -1] b = [2; 16; 8; 0; 0; 0] out [12] 6-element vector(Int64}: UndefvarError: 'norm not defined Home Page - Select or cre X and In [25]: # Define the constraints for i in 1:size(A, 1) @constraint (model, A[i, :]' *x + r ³ norm(A[i, :]) <= b[i]) end [3] top-level scope @ .\In[25]:3 stacktrace: [1] macro expansion. @D:\Julia-1.9.3\Julia PKG\packages\MutableArithmetics\K9YPJ\src\rewrite.j1:321 [inlined] [2] macro expansion @D:\Julia-1.9.3\JuliaPKG\packages\JUMP\D44Aq\src\macros.j1:717 [inlined] W 主页 -清华大学研究生... S Not Trusted chep center norm not - Ju X P Logout Julia 1.9.3 O 50% Home_留学中国 X + New user screen ENG US I X 3:13 AM 12/3/2023 ||| Don't show anymore
Julia 1.9.3
julia> import Pkg
julia> Pkg.add("LinearAlgebra")
Resolving package versions...
No Changes to `D:\Julia-1.9.3\JuliaPKG\environments\v1.9\Project.toml`
No Changes to `D:\Julia-1.9.3\JuliaPKG\environments\v1.9\Manifest.toml`
julia> import Pkg
julia> Pkg.add("Norm")
ERROR: The following package names could not be resolved:
* Norm (not found in project, manifest or registry)
Suggestions: NormalMaps NormalForms NormalSplines normaliz_jll Normalization NormalizingFlows NormalizeQuantiles
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg. Types C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:69
[2] ensure_resolved (ctx ::Pkg. Types.Context, manifest::Pkg. Types. Manifest, pkgs :: Vector {Pkg. Types. PackageSpec}; registry::Bool)
@ Pkg. Types C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:1003
[3] ensure_resolved
ر
@
C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:954 [inlined]
[4] add(ctx ::Pkg. Types.Context, pkgs::Vector (Pkg. Types.PackageSpec}; preserve::Pkg. Types. Preserve Level, platform: :Base.BinaryPlatforms.Platform, kwargs::Base.Pairs {Symbol
Base.TTY, Tuple{Symbol}, Named Tuple{(:io,), Tuple{Base.TTY}}})
@ Pkg. API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:264
[5] add(pkgs :: Vector {Pkg. Types. PackageSpec }; io::Base.TTY, kwargs::Base. Pairs {Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:156
[6] add(pkgs :: Vector (Pkg. Types. PackageSpec})
@ Pkg.API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:145
[7] #add#25
@ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:144 [inlined]
[8] add
[inlined]
@ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:144
[9] #add#24
@ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:143 [inlined]
[10] add(pkg::String)
@ Pkg.API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:143
[11] top-level scope
@REPL[3]:1
julia> Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master") # From url to remote gitrepo Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master
") # From url to remote gitrepo Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master") # From url to remote gitrepo
1 -4°C
多云
W
S P
X
ENG
US
4:43 AM
12/3/2023
I
Transcribed Image Text:Julia 1.9.3 julia> import Pkg julia> Pkg.add("LinearAlgebra") Resolving package versions... No Changes to `D:\Julia-1.9.3\JuliaPKG\environments\v1.9\Project.toml` No Changes to `D:\Julia-1.9.3\JuliaPKG\environments\v1.9\Manifest.toml` julia> import Pkg julia> Pkg.add("Norm") ERROR: The following package names could not be resolved: * Norm (not found in project, manifest or registry) Suggestions: NormalMaps NormalForms NormalSplines normaliz_jll Normalization NormalizingFlows NormalizeQuantiles Stacktrace: [1] pkgerror(msg::String) @ Pkg. Types C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:69 [2] ensure_resolved (ctx ::Pkg. Types.Context, manifest::Pkg. Types. Manifest, pkgs :: Vector {Pkg. Types. PackageSpec}; registry::Bool) @ Pkg. Types C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:1003 [3] ensure_resolved ر @ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\Types.j1:954 [inlined] [4] add(ctx ::Pkg. Types.Context, pkgs::Vector (Pkg. Types.PackageSpec}; preserve::Pkg. Types. Preserve Level, platform: :Base.BinaryPlatforms.Platform, kwargs::Base.Pairs {Symbol Base.TTY, Tuple{Symbol}, Named Tuple{(:io,), Tuple{Base.TTY}}}) @ Pkg. API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:264 [5] add(pkgs :: Vector {Pkg. Types. PackageSpec }; io::Base.TTY, kwargs::Base. Pairs {Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Pkg.API C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:156 [6] add(pkgs :: Vector (Pkg. Types. PackageSpec}) @ Pkg.API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:145 [7] #add#25 @ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:144 [inlined] [8] add [inlined] @ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:144 [9] #add#24 @ C:\Users\HP\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:143 [inlined] [10] add(pkg::String) @ Pkg.API C:\Users\Hp\AppData\Local\Programs\Julia-1.9.3\share\julia\stdlib\v1.9\Pkg\src\API.j1:143 [11] top-level scope @REPL[3]:1 julia> Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master") # From url to remote gitrepo Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master ") # From url to remote gitrepo Pkg.add(url="https://github.com/JuliaLang/Example.jl", rev="master") # From url to remote gitrepo 1 -4°C 多云 W S P X ENG US 4:43 AM 12/3/2023 I
Expert Solution
steps

Step by step

Solved in 4 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY